Add FreeBSD stub init script from Denis Denisov
This commit is contained in:
parent
8a5b6c03dc
commit
bee031c057
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: fastnetmon
|
||||
# REQUIRE: NETWORKING SERVERS LOGIN
|
||||
# BEFORE: securelevel
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following line to /etc/rc.conf to enable `fastnetmon':
|
||||
#
|
||||
#fastnetmon_enable="YES"
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="fastnetmon"
|
||||
rcvar="${name}_enable"
|
||||
|
||||
command="/usr/local/bin/fastnetmon"
|
||||
start_precmd="start_precmd"
|
||||
pidfile="/var/run/$name.pid"
|
||||
|
||||
# read configuration and set defaults
|
||||
load_rc_config "$name"
|
||||
: ${fastnetmon_enable="NO"}
|
||||
: ${fastnetmon_user="fastnetmon"}
|
||||
#: ${fastnetmon_config="/usr/local/etc/$name.conf"}
|
||||
|
||||
start_precmd()
|
||||
{
|
||||
echo -n "Starting fastnetmon deamon:" && \
|
||||
su -m $fastnetmon_user -c "$command"; && \
|
||||
echo .
|
||||
return 0
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
Loading…
Reference in New Issue