Add systemd unit file for the python poller service.

Move poller-service init scripts into to scripts directory and update the documentation.
This commit is contained in:
Tony Murray
2016-02-02 20:23:08 -06:00
parent 8ed3b75b21
commit 44cd86d24e
4 changed files with 23 additions and 5 deletions
+26
View File
@@ -0,0 +1,26 @@
# poller-service - SNMP polling service for LibreNMS
description "SNMP polling service for LibreNMS"
author "Clint Armstrong <clint@clintarmstrong.net>"
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Restart an unlimited amount of times
respawn limit unlimited
chdir /opt/librenms
setuid librenms
setgid librenms
# Start the process
exec /opt/librenms/poller-service.py
# Wait 60 seconds before restart
post-stop exec sleep 60