I'd like my openSuse 11.1 server to run a small shell script on startup. I've created a the script and put a symbolic link to the script in /etc/init.d/rc5.d/. Yet, the script does not get executed.
This is the script I am trying to run:
#!/bin/bash #monitor RAID array /sbin/mdadm --monitor --daemonize --email@example.com /dev/md0 /dev/md1 /dev/md2 /dev/md3 #start SVN server /usr/bin/svnserve -d
The script works fine when I run it myself from the command line (svn server and mdadm are daemonized as expected). But it does not seem to be started when rebooting the server.
This might help you figure out what I am doing wrong:
linuxplug:~ # ls -l /etc/init.d/rc5.d/exe* lrwxrwxrwx 1 root root 25 May 22 11:43 /etc/init.d/rc5.d/executeatstartup.sh -> /root/executeatstartup.sh linuxplug:~ # ls -l /root/executeatstartup.sh -rwxr-xr-x 1 root root 172 Apr 12 13:43 /root/executeatstartup.sh linuxplug:~ # which svnserve /usr/bin/svnserve
What am I doing wrong?
Edit: I've renamed the link to the shell script as follows:
linuxplug:~ # ls -l /etc/init.d/rc5.d/ lrwxrwxrwx 1 root root 25 May 22 12:03 S99executeatstartup -> /root/executeatsta rtup.sh
However, the script still isn't run on startup.