blob: 37248bfcdbf2007401cb291d3c5ff489246086a7 (
plain) (
blame)
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: dnetc
# REQUIRE: LOGIN
# KEYWORD: FreeBSD shutdown
dnetc_enable=${dnetc_enable:-"NO"}
dir="%%BINDIR%%"
user="%%CLIENTUSER%%"
. %%RC_SUBR%%
name="dnetc"
rcvar=`set_rcvar`
required_files=${dir}/${name}.ini
start_cmd="${name}_start"
stop_cmd="${name}_stop"
dnetc_start()
{
echo -n " dnetc"
su -m ${user} -c "${dir}/dnetc -quiet" 2>/dev/null >/dev/null
}
dnetc_stop()
{
su -m ${user} -c "${dir}/dnetc -shutdown" 2>/dev/null >/dev/null
echo -n " dnetc"
}
load_rc_config $name
run_rc_command "$1"
|