|
|
@ -35,6 +35,7 @@ while true; do
|
|
|
|
|
|
|
|
|
|
|
|
# reset triggers to negative values
|
|
|
|
# reset triggers to negative values
|
|
|
|
qbittorrent_running="false"
|
|
|
|
qbittorrent_running="false"
|
|
|
|
|
|
|
|
privoxy_running="false"
|
|
|
|
ip_change="false"
|
|
|
|
ip_change="false"
|
|
|
|
port_change="false"
|
|
|
|
port_change="false"
|
|
|
|
|
|
|
|
|
|
|
@ -71,6 +72,22 @@ while true; do
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
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
|
|
|
|
# run scripts to identify external ip address
|
|
|
|
source /home/nobody/getvpnextip.sh
|
|
|
|
source /home/nobody/getvpnextip.sh
|
|
|
|
|
|
|
|
|
|
|
@ -126,6 +143,17 @@ while true; do
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ "${ENABLE_PRIVOXY}" == "yes" ]]; then
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ "${privoxy_running}" == "false" ]]; then
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# run script to start privoxy
|
|
|
|
|
|
|
|
source /home/nobody/privoxy.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
echo "[warn] VPN IP not detected, VPN tunnel maybe down"
|
|
|
|
echo "[warn] VPN IP not detected, VPN tunnel maybe down"
|
|
|
@ -144,6 +172,20 @@ while true; do
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
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
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [[ "${DEBUG}" == "true" && "${VPN_ENABLED}" == "yes" ]]; then
|
|
|
|
if [[ "${DEBUG}" == "true" && "${VPN_ENABLED}" == "yes" ]]; then
|
|
|
|