diff --git a/src/freedombone-base-email b/src/freedombone-base-email index fc248bfc..84ba3a8a 100755 --- a/src/freedombone-base-email +++ b/src/freedombone-base-email @@ -157,10 +157,12 @@ function configure_email_onion { return fi - echo 'HiddenServiceDir /var/lib/tor/hidden_service_email/' >> /etc/tor/torrc - echo 'HiddenServicePort 25 127.0.0.1:25' >> /etc/tor/torrc - echo 'HiddenServicePort 587 127.0.0.1:587' >> /etc/tor/torrc - echo 'HiddenServicePort 465 127.0.0.1:465' >> /etc/tor/torrc + if ! grep -q "hidden_service_email" /etc/tor/torrc; then + echo 'HiddenServiceDir /var/lib/tor/hidden_service_email/' >> /etc/tor/torrc + echo 'HiddenServicePort 25 127.0.0.1:25' >> /etc/tor/torrc + echo 'HiddenServicePort 587 127.0.0.1:587' >> /etc/tor/torrc + echo 'HiddenServicePort 465 127.0.0.1:465' >> /etc/tor/torrc + fi function_check onion_update onion_update @@ -170,6 +172,7 @@ function configure_email_onion { if [[ $(onion_service_exists email) == "0" ]]; then echo $"email onion site hostname not found" + systemctl restart tor exit 782352 fi