Showing changes from revision #3 to #4:
Added | Removed
Here working Gentoo init script. I had to do a funny thing to get start-stop-daemon to capture the pid (so that stop kills the process).. instead of using the—daemon option on instiki, I used—background on start-stop-daemon (without both, the script does not fork with hilarious consequences). Not sure why start-stop-daemon coupled with—daemon does not work – suggestions / improvements appreciated!
ChrisP
#!/sbin/runscript
start() {
ebegin "Starting instiki"
# Start me up!
start-stop-daemon -v --background --start --pidfile /var/run/instiki.pid --make-pidfile
--exec /opt/instiki/instiki-0.10.2/instiki.rb -- --port=2500 --storage=/opt/instiki/instiki-0.10.2/storage
sleep 5
eend $?
}
stop() {
ebegin $"Stopping instiki: "
start-stop-daemon -v --stop --pidfile /var/run/instiki.pid
sleep 5
eend $?
}