Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ sudo apt-get install daemontools
- $ sudo apt-get install daemontools-run # not clear if this is necessary
- $ sudo apt-get install csh # unsure why csh would be needed to run dt
- $ sudo mkdir /service
- $ sudo mkdir /service/test
- $ sudo chmod 1755 /service/test
- $ vi /service/test/run # see below
- $ vi /etc/rc.local # see below
- $ # tried power cycling here too
- $ sudo svstat /service/test # Why is supervise not running here?
- /service/test/: supervise not running
- $ sudo supervise /service/test/ > /dev/null &
- [1] 2747
- $ sudo svstat /service/test/
- /service/test/: up (pid 2758) 1 seconds
- #########################################################
- # contents of /service/test/run:
- #!/bin/sh
- echo Running service
- exec echo hello
- #########################################################
- # contents of /etc/rc.local
- #!/bin/sh -e
- #
- # rc.local
- #
- # This script is executed at the end of each multiuser runlevel.
- # Make sure that the script will "exit 0" on success or any other
- # value on error.
- #
- # In order to enable or disable this script just change the execution
- # bits.
- #
- # By default this script does nothing.
- csh -cf '/usr/bin/svscanboot &'
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement