Skip to content

Commit

Permalink
Merge pull request #394 from notnmeyer/systemd-service-file
Browse files Browse the repository at this point in the history
Add a systemd service file
  • Loading branch information
gmr committed Oct 19, 2015
2 parents 3fcf905 + bb36693 commit fa9c481
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions etc/systemd/system/newrelic-plugin-agent.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[Unit]
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 fa9c481

Please sign in to comment.