Ensure that the tor config files remain active even if the original torrc was overwritten
This commit is contained in:
parent
dce5921d5d
commit
5b5050a708
|
@ -35,6 +35,10 @@ ONION_SERVICES_FILE=/etc/torrc.d/${PROJECT_NAME}
|
||||||
|
|
||||||
function torrc_migrate {
|
function torrc_migrate {
|
||||||
if [ -f $ONION_SERVICES_FILE ]; then
|
if [ -f $ONION_SERVICES_FILE ]; then
|
||||||
|
if grep -q "#%include /etc/torrc.d" /etc/tor/torrc; then
|
||||||
|
sed -i 's|#%include /etc/torrc.d|%include /etc/torrc.d|g' /etc/tor/torrc
|
||||||
|
systemctl restart tor
|
||||||
|
fi
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
systemctl stop tor
|
systemctl stop tor
|
||||||
|
|
Loading…
Reference in New Issue