LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   start up script(part 2) (https://www.linuxquestions.org/questions/ubuntu-63/start-up-script-part-2-a-779221/)

izghitu 01-01-2010 07:21 AM

start up script(part 2)
 
Hi,

I added a script to /etc/init.d/local and made it run at boot using:
Code:

update-rc.d local defaults 80
Is there any way for me to make it NOT run when the server is rebooted/halted?

Please advise.

carltm 01-02-2010 05:32 AM

The classic way to handle this is to add a case statement, since these
scripts are called with a parameter such as start and stop.

case "$1" in
start)
echo Starting $0...
;;
stop)
echo "Doing nothing" > /dev/null
;;
*)
echo "Only start and stop options are supported for $0" >&2
;;
esac


All times are GMT -5. The time now is 07:29 AM.