Skip to content

Instantly share code, notes, and snippets.

@developerinlondon
Forked from karnauskas/jenkins.service
Created June 14, 2016 06:00
Show Gist options
  • Save developerinlondon/446bd9031c2df60814a5fb7ec271f068 to your computer and use it in GitHub Desktop.
Save developerinlondon/446bd9031c2df60814a5fb7ec271f068 to your computer and use it in GitHub Desktop.
Jenkins service unit file for Systemd
[Unit]
Description=Jenkins
After=network.target
Requires=network.target
[Service]
Type=simple
EnvironmentFile=/etc/sysconfig/jenkins
ExecStart=/usr/bin/java ${JENKINS_JAVA_OPTIONS} -jar /usr/lib/jenkins/jenkins.war --httpPort=${JENKINS_PORT} --httpListenAddress=${JENKINS_LISTEN_ADDRESS} ${JENKINS_ARGS}
Restart=always
User=jenkins
RestartSec=20
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment