diff options
author | demon <demon@FreeBSD.org> | 2006-02-16 02:16:02 +0800 |
---|---|---|
committer | demon <demon@FreeBSD.org> | 2006-02-16 02:16:02 +0800 |
commit | 383f6d1eb96e42b51886766bd0607ee4a4bbe4d5 (patch) | |
tree | 899aa261c4fcf6ea83b9b8104d502e30860e83ce /net-mgmt/mrtg | |
parent | 0964048a393983206d28b6ad5a41d3a652ab2262 (diff) | |
download | freebsd-ports-gnome-383f6d1eb96e42b51886766bd0607ee4a4bbe4d5.tar.gz freebsd-ports-gnome-383f6d1eb96e42b51886766bd0607ee4a4bbe4d5.tar.zst freebsd-ports-gnome-383f6d1eb96e42b51886766bd0607ee4a4bbe4d5.zip |
Remove mrtg lock and pid files before starting daemon.
Submitted by: Jan Srzednicki <w@expro.pl>
Diffstat (limited to 'net-mgmt/mrtg')
-rw-r--r-- | net-mgmt/mrtg/files/mrtg_daemon.sh.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net-mgmt/mrtg/files/mrtg_daemon.sh.in b/net-mgmt/mrtg/files/mrtg_daemon.sh.in index c241709459a1..0662c0286ff5 100644 --- a/net-mgmt/mrtg/files/mrtg_daemon.sh.in +++ b/net-mgmt/mrtg/files/mrtg_daemon.sh.in @@ -22,9 +22,16 @@ load_rc_config $name : ${mrtg_daemon_flags="--pid-file $mrtg_daemon_pidfile --lock-file /var/run/mrtg/lockfile --confcache-file /var/run/mrtg/confcache --user $mrtg_daemon_user --group $mrtg_daemon_user --daemon $mrtg_daemon_config"} +start_precmd="mrtg_daemon_precmd" + command="%%PREFIX%%/bin/mrtg" command_interpreter="%%PERL%%" pidfile=${mrtg_daemon_pidfile} +mrtg_daemon_precmd() +{ + rm -f /var/run/mrtg/lockfile /var/run/mrtg/confcache $mrtg_daemon_pidfile +} + run_rc_command "$1" |