Quote:
Originally Posted by scottro
Thanks for coming back and posting the solution. Just for the newcomers, would you mind going into a bit more detail? (It might save some of them from making similar errors.)
If you don't have time to do so, of course, that's fine too.
|
I needed a script to start and stop a daemon on startup. Normally I just gank a script from elsewhere that does something similar and go from there. Doing so should normally be fine with /etc/init.d/xxxx
However anacron the script i started with manages itself so it caused some errors.
specifically the script I had, needed to have
touch $LOCKFILE in the start portion and
rm $LOCKFILE in the stop portion
LOCKFILE is defined as
LOCKFILE=/var/lock/susbsys/$prog
also, when you make changes to your script in /etc/init.d you need to or at least I needed to chkconfig --del script name;
change script
chkconfig --add script name; to update the symlinked files in /etc/rc*/rc*