I have created on our Debian squeeze my own daemon from skeleton where is my application starting (+I add there some logging to my log file). I have put this file to /etc/init.d/
cp /home/ja /etc/init.d/ucloud-test -f
chown root /etc/init.d/ucloud-test
chmod 775 /etc/init.d/ucloud-test
After that I created symlinks to this daemon:
ln -sf ../init.d/ucloud-test /etc/rc0.d/K02ucloud-test
ln -sf ../init.d/ucloud-test /etc/rc1.d/K02ucloud-test
ln -sf ../init.d/ucloud-test /etc/rc6.d/K02ucloud-test
ln -sf ../init.d/ucloud-test /etc/rc2.d/S17ucloud-test
ln -sf ../init.d/ucloud-test /etc/rc3.d/S17ucloud-test
ln -sf ../init.d/ucloud-test /etc/rc4.d/S17ucloud-test
ln -sf ../init.d/ucloud-test /etc/rc5.d/S17ucloud-test
It created this symlinks:
root@id135728-2:/home/ja# cd /etc
root@id135728-2:/etc# ls -l rc* | grep ucloud-test
lrwxrwxrwx 1 root root 21 Aug 7 13:15 K02ucloud-test -> ../init.d/ucloud-test
lrwxrwxrwx 1 root root 21 Aug 7 13:15 K02ucloud-test -> ../init.d/ucloud-test
lrwxrwxrwx 1 root root 21 Aug 7 13:15 S17ucloud-test -> ../init.d/ucloud-test
lrwxrwxrwx 1 root root 21 Aug 7 13:15 S17ucloud-test -> ../init.d/ucloud-test
lrwxrwxrwx 1 root root 21 Aug 7 13:15 S17ucloud-test -> ../init.d/ucloud-test
lrwxrwxrwx 1 root root 21 Aug 7 13:15 S17ucloud-test -> ../init.d/ucloud-test
lrwxrwxrwx 1 root root 21 Aug 7 13:15 K02ucloud-test -> ../init.d/ucloud-test
If I try to read some of those symlinks it shows code from my daemon (it should be right).
root@id135728-2:/etc# cat rc0.d/K02ucloud-test
After reboot looks like that my daemon is not executed (application is not working and there is nothing in my log file). But if I execute that daemon myself application is working and there logging in my log.
/etc/init.d/ucloud-test start
Does anyone know where can be a issue? Thanks, Roman