Restart tor on migration failure

This commit is contained in:
Bob Mottram 2018-04-20 13:16:58 +01:00
parent 5b5050a708
commit f56f58e422
1 changed files with 1 additions and 0 deletions

View File

@ -48,6 +48,7 @@ function torrc_migrate {
grep "HiddenServiceDir\\|HiddenServiceVersion\\|HiddenServicePort" /etc/tor/torrc | grep -v "#HiddenServiceDir" >> $ONION_SERVICES_FILE
if ! grep "HiddenServiceVersion" $ONION_SERVICES_FILE; then
systemctl restart tor
return
fi