aboutsummaryrefslogtreecommitdiffstats
path: root/net/generic-nqs/files/nqs.sh
blob: e5056ad046c59480b881f7f5279bf1cf5bbf30f4 (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
#!/bin/sh
#

# PROVIDE: nqs
# REQUIRE: NETWORKING SERVERS
# BEFORE: LOGIN
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable NQS:
# nqs_enable (bool):      Set to "NO" by default.
#                             Set it to "YES" to enable NQS

. %%RC_SUBR%%

name="nqs"
rcvar=`set_rcvar`

prefix="XXXX"
logfile="/var/log/nqs.log"
start_cmd="nqs_start"
stop_cmd="nqs_stop"
load_rc_config $name

nqs_start()
{
    ${prefix}/sbin/nqsdaemon >> ${logfile} 2>&1 && echo 'Starting nqs.'
}

nqs_stop()
{
    /usr/bin/killall -KILL nqsdaemon netdaemon loaddaemon && echo 'Stopping nqs.'
}

run_rc_command "$1"