blob: c0f3f7ca7683346f4b111ba569753b88b7515f51 (
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
|
#!/bin/sh
#
# Author: Mark Felder <feld@FreeBSD.org>
# PROVIDE: nsnotifyd
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable nsnotifyd:
# nsnotifyd_enable="YES"
# nsnotifyd_flags="<set as needed>"
. /etc/rc.subr
name=nsnotifyd
rcvar=nsnotifyd_enable
load_rc_config $name
: ${nsnotifyd_enable:=NO}
command="/usr/local/bin/nsnotifyd"
start_precmd=precmd
precmd()
{
if [ "${nsnotifyd_flags}x" = "x" ]; then
echo "Please set your required service options via nsnotifyd_flags in /etc/rc.conf."
echo "Check the contents of man nsnotifyd for more details."
exit 1
fi
}
run_rc_command "$1"
|