My script @ /etc/init.d doesn't run when I log off. It works fine at logon.
I have made a script, which is supposed to upload my current ip-address and online-status to a static www-server. This way I'd have a www-server running any time my comp is on, but the link inside would disappear when I log off.
There are 2 scripts: "httpstart.sh" and "httpstop.sh", and they are supposed to be run when the runlevel changes to 5. Both scripts work manually: "/sbin service wwwserv {stop|start}" and from the graphical services tool.
I have put a script "wwwserv" to /etc/init.d/, and ran "chkconfig --add wwwserv" + "chkconfig --level 5 wwwserv on". I have also checked /etc/rcN.d/ directories, and they have the right links there (K05wwwserv @ /rc6.d/).
Here is the "wwwserv" script:
-----------------------------------------------------------
#!/bin/sh
# chkconfig: - 99 5
# description: running a simple script at boottime
# processname: wwwserv
# /etc/sysconfig/httpstart.sh
# /etc/sysconfig/httpstop.sh
##################################################
case "$1" in
start)
echo -n "Starting wwwserv: "
/etc/sysconfig/httpstart.sh
echo
;;
stop)
echo -n "Stopping wwwserv: "
/etc/sysconfig/httpstop.sh
echo
;;
restart)
$0 stop
$0 start
;;
*)
echo $"Usage: wwwserv {start|stop|restart}"
exit 1
esac
exit 0
-------------------------------------------------------------
There is nothing done when i turn off the computer, and I didn't fnd any errors from /var/log/messages (starting the service seems to work fine).
I'm running rh9.0 with adsl.
Any suggestions, or more info needed??