[mrtg] UNIX/Linux startup script, anyone??

Michael Marziani michaelm at kw.com
Wed Mar 13 20:30:20 MET 2002


When running MRTG as a daemon, it creates a pid file that would normally
be deleted when MRTG shuts down via a TERM signal.  Problem is, somehow
when the system is rebooted, MRTG is getting killed improperly, so the
PIDfile remains and MRTG won't restart when the system reboots.  My
current init script is:

--------------------------------------
#! /bin/sh

cd /usr/local/mrtg/bin && ./mrtg --user=mrtg \
      /usr/local/mrtg/cfg/mrtg.cfg  --logging /var/log/mrtg.log &
--------------------------------------

Has anyone written a script that can actually handle the "start",
"stop", "restart" commands?  This would solve my problem as it would
successfully send a "stop" when shutting down and mrtg would shutdown
properly and remove it's pid file.

If no one has written such a script, I'd be more than happy to write one
and share it, but I'd rather not spend the time if someone already has
done this.  Thanks!!!

-Mike

_____________________________
Michael D. Marziani
Systems Administrator

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list