Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Supervisor and systemd config for jenkins slave
[Unit]
Description=Jenkins Slave
Wants=network.target
After=network.target
[Service]
ExecStart=/usr/bin/java -Xms512m -Xmx512m -jar /opt/jenkins/slave.jar -jnlpUrl http://${JENKINS_SERVER}/slave-agent.jnlp -secret ${SECRET}
User=jenkins
Restart=always
RestartSec=10
StartLimitInterval=0
[Install]
WantedBy=multi-user.target
[program:jenkins-slave]
command = /usr/bin/java -Xms512m -Xmx512m -jar /opt/jenkins/slave.jar -jnlpUrl http://${JENKINS_SERVER}/slave-agent.jnlp -secret ${SECRET}
stdout_logfile = syslog
redirect_stderr = true
user = jenkins
@alanduan
Copy link

alanduan commented Jun 6, 2020

Helpful! Thanks for sharing!

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