#!/bin/bash
case "${1:-''}" in
'start')
# put the command to start
;;
'stop')
# stop command here
;;
'restart')
# restart command here
;;
*)
echo "Usage: $SELF start|stop|restart"
exit 1
;;
esac
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:
Post a Comment