This commit is contained in:
rootzoll 2020-08-02 17:00:26 +02:00
commit 8622d48fd3

View file

@ -76,8 +76,9 @@ if [ "${runBehindTor}" = "on" ]; then
HiddenServiceDir /mnt/hdd/tor/$service
HiddenServiceVersion 3
HiddenServicePort $toPort 127.0.0.1:$fromPort" | sudo tee -a /etc/tor/torrc
# remove double lines
sudo awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' /etc/tor/torrc > /mnt/hdd/temp/tmp && sudo mv /mnt/hdd/temp/tmp /etc/tor/torrc
awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' /etc/tor/torrc | sudo tee /mnt/hdd/temp/tmp >/dev/null && sudo mv /mnt/hdd/temp/tmp /etc/tor/torrc
# check and insert second port pair
if [ ${#toPort2} -gt 0 ]; then