blob: a3ad075b0786c84a64da8c7bf4f9e6979c9dd8dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: mrtg_daemon
# REQUIRE: DAEMON bsnmpd snmpd
. %%RC_SUBR%%
name="mrtg_daemon"
rcvar=`set_rcvar`
load_rc_config $name
: ${mrtg_daemon_enable="NO"}
: ${mrtg_daemon_pidfile="/var/run/mrtg/mrtg.pid"}
: ${mrtg_daemon_user="mrtg"}
: ${mrtg_daemon_group="mrtg"}
: ${mrtg_daemon_config="%%PREFIX%%/etc/mrtg/mrtg.cfg"}
: ${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_group --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"
|