Reputation: 1174
I have a script called "storelogs" located in /etc/init.d and I have link to this in /etc/rc0.d and /etc/rc6.d called "K01storelogs".
The script runs absolutely fine when I call it directly from /etc/init.d but when I try and reboot the machine, the script doesn't ever seem to get called.
The script actually calls a php script which does a few bits and peices - and like I said, the script runs fine when I call it directly.
The script is incredibly simple:
#!/bin/sh
/usr/bin/php /var/www/html/storeLogs.php
Have I missed a step? Whats an easy way to debug this?
Cheers in advance!
Andy
Upvotes: 0
Views: 630
Reputation: 114
Are you sure the script is actually runing at startup ? You can try to add something like logger "my script is ruuning" in the script in order to be sure.
Please check also with chkconfig tool if the startup links are ok for your runlevel
Upvotes: 1