blob: 82f0f66c56f7030c949d3dc6a1ec618b0cb4c410 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#!/bin/sh
#
# macroscope - start Macroscope daemon
#
# $FreeBSD$
#
# PROVIDE: macroscope
# REQUIRE: DAEMON
# KEYWORD: shutdown
# -----------------------------------------------------------------------------
# macroscope_enable="NO" # set to YES to enable macroscope
#
# # optional:
# macroscope_flags="" # additional command line arguments
#
. %%RC_SUBR%%
name="macroscope"
rcvar=$(set_rcvar)
start_precmd()
{
return 0
}
stop_postcmd()
{
rm -f "$pidfile" || warn "Could not remove $pidfile."
}
# pidfile
eval pidfile=\$${name}_pidfile
pidfile=${pidfile:-/var/run/${name}.pid}
echo ${pidfile}
# command and arguments
command="%%PREFIX%%/sbin/${name}"
# run this first
start_precmd="start_precmd"
# and this last
stop_postcmd="stop_postcmd"
load_rc_config ${name}
command_args="--sniffer --daemon --pid ${pidfile}"
run_rc_command "$1"
|