1
description "Starts a core-selftest-agent process"
3
start on (local-filesystems and net-device-up IFACE=eth0)
4
stop on runlevel [!12345]
6
# use sigint so python code just needs to catch KeyboardInterrupt
9
# If the process quits unexpectedly trigger respawn it
11
# unless it fails 15 times within 5 seconds
14
env SERVICE_DIR=/srv/{{ environment }}/core-selftest-agent
15
env SERVICE_USER=core-worker
19
install -d -o ${SERVICE_USER} ${SERVICE_DIR}/logs
21
exec sudo -u ${SERVICE_USER} sh -c "./ve/bin/python3 core-selftest-agent.py -c ${SERVICE_DIR}/core-service.conf >> logs/core-selftest-agent.log 2>&1"