Skip to content

Instantly share code, notes, and snippets.

@karnauskas
Created October 13, 2014 21:45
Show Gist options
  • Save karnauskas/aca138bb8338689a178e to your computer and use it in GitHub Desktop.
Save karnauskas/aca138bb8338689a178e 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
@basil
Copy link

basil commented Feb 1, 2022

Interesting to see that small piece of config still makes some traction 7 years later.

Because in all these years the Jenkins project still hasn't shipped systemd(1)-based packages. But that is about to change in jenkinsci/packaging#266.

@csaltos
Copy link

csaltos commented Feb 2, 2022

Buenísimo !! 👍😎

@arturocandela
Copy link

Me ha servido mucho, gracias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment