Skip to content
Go to file
Cannot retrieve contributors at this time
46 lines (38 sloc) 1002 Bytes
# <name of daemon>
# <Longer description>
description "Derp"
author "Herp Herp D Derp"
# The below "start on" line controls when it starts up. There are many options available.
start on (local-filesystems and net-device-up)
#Ditto for stop on.
stop on runlevel [016]
respawn limit 5 30
env uid=<user to run as>
env gid=<group to run as>
env umask=000
#A more insane start condition. This one is based off starting lightdm
start on ((filesystem
and runlevel [!06]
and started dbus
and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
or stopped udev-fallback-graphics))
or runlevel PREVLEVEL=S)
stop on runlevel [016]
#The below lines are run as a shell script on start, and the started binaries killed on stop.
if [ "$RUNLEVEL" = S -o "$RUNLEVEL" = 1 ]
# Single-user mode
exit 0
exec <some binary>
end script
#This runs after stop
post-stop script
rm /some/tmp/files/
end script
You can’t perform that action at this time.