privoxy checks now in watchdog

pull/22/head 4.1.5-2-03
binhex 5 years ago
parent 280483878b
commit b8e6ebd8c6

@ -35,6 +35,7 @@ while true; do
# reset triggers to negative values
qbittorrent_running="false"
privoxy_running="false"
ip_change="false"
port_change="false"
@ -71,6 +72,22 @@ while true; do
fi
if [[ "${ENABLE_PRIVOXY}" == "yes" ]]; then
# check if privoxy is running, if not then skip shutdown of process
if ! pgrep -fa "privoxy" > /dev/null; then
echo "[info] Privoxy not running"
else
# mark as privoxy as running
privoxy_running="true"
fi
fi
# run scripts to identify external ip address
source /home/nobody/getvpnextip.sh
@ -126,6 +143,17 @@ while true; do
fi
if [[ "${ENABLE_PRIVOXY}" == "yes" ]]; then
if [[ "${privoxy_running}" == "false" ]]; then
# run script to start privoxy
source /home/nobody/privoxy.sh
fi
fi
else
echo "[warn] VPN IP not detected, VPN tunnel maybe down"
@ -144,6 +172,20 @@ while true; do
fi
if [[ "${ENABLE_PRIVOXY}" == "yes" ]]; then
# check if privoxy is running, if not then start via privoxy.sh
if ! pgrep -fa "privoxy" > /dev/null; then
echo "[info] Privoxy not running"
# run script to start privoxy
source /home/nobody/privoxy.sh
fi
fi
fi
if [[ "${DEBUG}" == "true" && "${VPN_ENABLED}" == "yes" ]]; then

Loading…
Cancel
Save