Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save oseme-techguy/affd4b7987f6731ed56541172ce950a6 to your computer and use it in GitHub Desktop.
Save oseme-techguy/affd4b7987f6731ed56541172ce950a6 to your computer and use it in GitHub Desktop.
$ cat /etc/systemd/system/jenkins.service
[Unit]
Description=Jenkins - open source automation server
Before=multi-user.target
After=network-online.target
[Service]
ExecStart=/etc/init.d/jenkins start
ExecStop=/etc/init.d/jenkins stop
CapabilityBoundingSet=~CAP_SYS_PTRACE
GuessMainPID=no
IgnoreSIGPIPE=no
KillMode=process
LimitNOFILE=64000
LimitNPROC=64000
ProtectHome=true
ProtectSystem=full
RemainAfterExit=yes
TimeoutSec=5min
Type=oneshot
$ grep KillExcludeUsers /etc/systemd/logind.conf
KillExcludeUsers=root jenkins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment