containers-tor/hidden_servicesd.sh
f 0caf3fe3e5
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: generate hidden services on demand
2023-03-28 15:19:25 -03:00

20 lines
359 B
Bash
Executable file

#!/bin/sh
set -e
dir=/var/empty
pid=/run/hidden_services.pid
usr=${USER:-tor}
adr=${SERVICE:-nginx}
prt=${PORT:-80}
case $1 in
start)
daemonize -c ${dir} -p ${pid} -l ${pid} -u ${usr} /usr/local/bin/syslogize /usr/bin/sutty_tor_hidden_service -S ${adr} -P ${prt}
;;
stop)
test -f ${pid} || exit 0
cat ${pid} | xargs -r kill
;;
esac