[Unit]
Description=Jenkins agent
Documentation=https://wiki.jenkins.io/display/JENKINS/Distributed+builds
After=network.target

[Service]
EnvironmentFile=/etc/default/jenkins-agent
ExecStart=/usr/bin/java -jar <%= @jenkins_agent_jar %> -jnlpUrl $JNLP_URL -secret $JNLP_SECRET -workDir $AGENT_WORKDIR
UnsetEnvironment=JNLP_URL JNLP_SECRET AGENT_WORKDIR

User=jenkins
Group=jenkins

KillMode=process

Restart=always
RestartSec=5s

[Install]
WantedBy=multi-user.target

[Unit]
Description=Jenkins agent
Documentation=https://wiki.jenkins.io/display/JENKINS/Distributed+builds
After=network.target

[Service]
EnvironmentFile=/etc/default/jenkins-agent
ExecStart=/usr/bin/java -jar <%= @jenkins_agent_jar %> -jnlpUrl $JNLP_URL -secret $JNLP_SECRET -workDir $AGENT_WORKDIR

User=jenkins
Group=jenkins

KillMode=process

Restart=always
RestartSec=5s

[Install]
WantedBy=multi-user.target

Remove UnsetEnvironment, which is now applied before systemd builds its command line
Remove UnsetEnvironment, which is now applied before systemd builds its command line
