only provision Tor when not running

This commit is contained in:
rootzoll 2021-05-26 11:04:10 -05:00
parent 47a1407f11
commit aaefb8df10

View file

@ -233,7 +233,8 @@ else
fi
# TOR
if [ "${runBehindTor}" = "on" ]; then
source <(/home/admin/config.scripts/internet.tor.sh status)
if [ "${runBehindTor}" == "on" ] && [ "${torRunning}" == "0" ]; then
echo "Provisioning TOR - run config script" >> ${logFile}
sudo sed -i "s/^message=.*/message='Setup Tor (takes time)'/g" ${infoFile}
sudo /home/admin/config.scripts/internet.tor.sh on >> ${logFile} 2>&1