Skip to content

Commit

Permalink
Use more robust systemd startup settings
Browse files Browse the repository at this point in the history
  • Loading branch information
obscurerichard committed Jun 2, 2015
1 parent 983e4ad commit 7102918
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions etc/systemd/system/newrelic-plugin-agent.service
Expand Up @@ -3,10 +3,18 @@ Description=newrelic-plugin-agent

[Service]
Type=forking
PrivateTmp=yes
User=newrelic
Group=newrelic
PermissionsStartOnly=true
PIDFile=/var/run/newrelic/newrelic-plugin-agent.pid
ExecStartPre=/bin/mkdir -p /var/run/newrelic
ExecStartPre=/bin/rm -f /var/run/newrelic/newrelic-plugin-agent.pid
ExecStartPre=/bin/chown -R newrelic:newrelic /var/run/newrelic
ExecStart=/usr/bin/newrelic-plugin-agent -c /etc/newrelic/newrelic-plugin-agent.cfg
ExecStop=/bin/kill -INT $MAINPID
Restart=on-abort

[Install]
WantedBy=multi-user.target

0 comments on commit 7102918

Please sign in to comment.