Enterprise-Onion-Toolkit/templates.d/debugon.sh.txt

18 wiersze
331 B
Bash

#!/bin/sh
# eotk (c) 2017 Alec Muffett
cd %PROJECT_DIR% || exit 1
%%IF %IS_SOFTMAP%
pidfiles=`echo %PROJECT_DIR%/%TOR_WORKER_PREFIX%*.d/tor.pid`
%%ELSE
pidfiles=%PROJECT_DIR%/tor.pid
%%ENDIF
for pidfile in $pidfiles ; do
test -s $pidfile &&
kill -USR1 `cat $pidfile` &&
kill -USR2 `cat $pidfile`
done
exit 0