blob: 0b1503213ab105dd52314c79535579c7bfb64b92 (
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
51
52
53
54
55
56
57
|
#!/bin/sh
# Burp rc.d script, placed in the public domain by Jarkko Kniivilä @ 2014-05-14
# PROVIDE: burp
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable Burp:
#
# burp_enable="YES"
# # optional
# burp_config="%%PREFIX%%/etc/burp/burp-server.conf"
#
#
export PATH="$PATH:%%PREFIX%%/bin:%%PREFIX%%/sbin"
. /etc/rc.subr
name=burp
rcvar=burp_enable
monitor_cmd="${name}_monitor"
summary_cmd="${name}_summary"
load_rc_config $name
# Set some defaults
: ${burp_enable:="NO"}
: ${burp_config:="%%PREFIX%%/etc/burp/burp-server.conf"}
burp_flags="-c ${burp_config}"
command="%%PREFIX%%/sbin/${name}"
command_args="> /dev/null 2>&1"
pidfile="/var/run/${name}.server.pid" # this really depends on the config file so make sure they concur
required_files="${burp_config}"
sig_reload="HUP"
extra_commands="reload monitor summary"
burp_monitor()
{
rc_flags="-a s ${rc_flags}"
${command} ${rc_flags}
}
burp_summary()
{
# This allows you to get the output of the '-a S' flag thusly:
# service burp summary -C $my_client
rc_flags="-a S ${rc_flags}"
${command} ${rc_flags} "$@"
}
run_rc_command "$@"
|