This commit is contained in:
parent
d2205b11a7
commit
02b9aebbe5
341 changed files with 1571 additions and 32574 deletions
35
run/openrc/nuke.initd
Executable file
35
run/openrc/nuke.initd
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
#!/sbin/openrc-run
|
||||
# shellcheck shell=sh
|
||||
|
||||
instance=${RC_SVCNAME#*.}
|
||||
|
||||
description="Nuke HTTP defense proxy (instance ${instance})"
|
||||
supervisor="supervise-daemon"
|
||||
command="/usr/bin/nuke"
|
||||
command_args="\
|
||||
-bind ${NUKE_BIND_PORT:-/run/nuke_${instance?}/nuke.sock -bind-network unix} \
|
||||
-metrics-bind ${NUKE_METRICS_BIND_PORT:-/run/nuke_${instance?}/metrics.sock -metrics-bind-network unix} \
|
||||
-target ${NUKE_TARGET:-http://localhost:3923} \
|
||||
-difficulty ${NUKE_DIFFICULTY:-4} \
|
||||
${NUKE_OPTS}
|
||||
"
|
||||
command_background=1
|
||||
pidfile="/run/nuke_${instance?}/nuke.pid"
|
||||
|
||||
: "${command_user:=nuke:nuke}"
|
||||
|
||||
depend() {
|
||||
use net firewall
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
if [ "${instance?}" = "${RC_SVCNAME?}" ]; then
|
||||
eerror "${RC_SVCNAME?} cannot be started directly. You must create"
|
||||
eerror "symbolic links to it for the services you want to start"
|
||||
eerror "and add those to the appropriate runlevels."
|
||||
return 1
|
||||
fi
|
||||
|
||||
rm -rf "/run/nuke_${instance?}"
|
||||
checkpath -D -o "${command_user?}" "/run/nuke_${instance?}"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue