Monday, August 1, 2011

Create simple Ubuntu(Debian?) start up script

- Create a file at /etc/init.d/<filename>

case "${1:-''}" in
# put the command to start
# stop command here
# restart command here
echo "Usage: $SELF start|stop|restart"
exit 1

sudo update-rc.d <filename> defaults

sudo /etc/init.d/<filename> <start|stop|restart>

- To remove
sudo rm /etc/rc*/*<filename>

Credit: Ivan in How do I make sphinx restart when I reboot my Ubuntu server?

No comments:

Clojure has lesser typing error problems than the others well-known dynamic typing languages

Give these snippets a try. // JS function foo () {   bar(1) } # Ruby def foo   bar(1) end ; Clojure (defn foo []    (bar 1)) As yo...