add: freebsd init script

This commit is contained in:
ziirish 2018-01-12 14:04:23 +01:00
parent 9e4a002928
commit a9f8309a27
No known key found for this signature in database
GPG key ID: 72DB229A64B54E46

View file

@ -0,0 +1,28 @@
#!/bin/sh
# PROVIDE: burpui
# REQUIRE: DAEMON
. /etc/rc.subr
name=burpui
rcvar=burpui_enable
pidfile="/var/run/${name}.pid"
load_rc_config $name
: ${burpui_enabled:="YES"}
command="/var/venv/bin/python"
command_args="\
/usr/local/bin/gunicorn \
--worker-class gevent \
--workers 4 \
--pid ${pidfile} \
--bind 0.0.0.0:80 \
--error-logfile /var/log/gunicorn_error.log \
--access-logfile /var/log/gunicorn_access.log \
--name burpui \
--daemon \
'burpui:create_app(conf=\"/etc/burp/burpui.cfg\",verbose=2,logfile=\"/var/log/burpui.log\")'"
run_rc_command "$1"