Last active
August 29, 2015 13:57
-
-
Save JensRantil/9644545 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "my application" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 360 180 | |
setuid myuser | |
setgid mygroup | |
chdir /my/directory | |
exec /bin/sleep 60 | |
post-start script | |
sleep 5 | |
stop | |
exit 1 | |
end script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/init$ sudo start myapp # returns after 5 seconds | |
myapp start/running, process 27477 | |
jrantil@myserver:/etc/init$ ps -ef|grep sleep | |
107 27477 1 0 16:56 ? 00:00:00 /bin/sleep 60 | |
jrantil 27482 26900 0 16:56 pts/1 00:00:00 grep --color=auto sleep |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment