blob: 3abb3d02712b310a17275eee0d0938b8621f565b (
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
38
39
40
41
42
43
44
45
46
47
48
|
#!/bin/sh
# PROVIDE: syslogd
# REQUIRE: mountcritremote cleanvar
# BEFORE: SERVERS
#
# Add the following lines to /etc/rc.conf to enable msyslogd:
#
# msyslogd_enable="YES"
#
# Yes, here you can pass arguments to daemon
#
# msyslogd_flags=
#
. /etc/rc.subr
name=msyslogd
rcvar=msyslogd_enable
command=%%PREFIX%%/sbin/syslogd
pidfile=/var/run/syslog.pid
required_files=%%PREFIX%%/etc/syslog.conf
start_precmd=start_precmd
stop_postcmd=stop_postcmd
extra_commands="reload"
start_precmd()
{
case $syslogd_enable in
[Yy][Ee][Ss]|1)
warn "syslogd_enable should be set to NO"
;;
esac
}
stop_postcmd()
{
rm -f $pidfile
}
# read settings, set default values
load_rc_config $name
: ${msyslogd_enable="NO"}
run_rc_command "$1"
|