freebsd-ports/sysutils/burp/files/burp.in
Lorenzo Salvadore 26f1775dd3 sysutils/burp-devel: Update to 2.3.24
- Protocol 2: warn and skip on verify/restore of unsupported file types.
- Resurrect, improve and use sysutils/burp/files/burp.in instead of the rc
script from distfile, both for sysutils/burp (master port) and for
sysutils/burp-devel (slave port): this is necessary because, while
sysutils/burp's distfile still distributes the script, sysutils/burp-devel's
distfile does not anymore starting with version 2.3.24. I also made a few
modifications to the file so that it behaves well with non standard PREFIX
values.

Reviewed by:	0mp, gerald, dbaio, adamw
Approved by:	tcberner (co-mentor)
Differential Revision:	https://reviews.freebsd.org/D24104
2020-04-01 20:05:55 +00:00

57 lines
1.1 KiB
Bash

#!/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 "$@"