Startup script on OpenSUSE Linux cheat sheet

Create a simple script invoking your commands, e.g.
case "$1" in
start)
/usr/local/NewAtlanta/BlueDragon_Server_JX_70/bin/StartBlueDragon.sh &
/usr/local/apache2/bin/apachectl start
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac

Drop it under /etc/init.d/ and make it executable.

Then run the following command:

chkconfig -a name_of_your_script

The chkconfig command copies your script to /etc/init.d/rc3.d and /etc/init.d/rc5.d prepending a couple of characters to the names so it can be executed during the boot process in runlevels 3 and 5 in a certain order. I tested my sample script that fires up Apache and BlueDragon JX on OpenSUSE 10.2.

2 Responses to “Startup script on OpenSUSE Linux cheat sheet”

  1. Anon Says:

    dude i i’m a total linux noob and ive been searching for hours just to try to get my 10.3 box to run a command at startup without any user input
    i followed another tutorial about this, and read the documention about creating startup services but it was still going over my head
    i side tracked to cron & crontab with no luck as well
    I come to your post and hope it works simply as you put it, and it did!

    Seriuosly,
    thanks man

  2. Chris Says:

    Great stuff, glad it was helpful :-)

Leave a Reply

You must be logged in to post a comment.