hiddenservice: fix showing the 2nd port

This commit is contained in:
openoms 2020-06-09 21:13:47 +01:00
parent 3f9f8b5fe8
commit 7e093473af
No known key found for this signature in database
GPG key ID: 5BFB77609B081B65

View file

@ -92,6 +92,7 @@ HiddenServicePort $toPort 127.0.0.1:$fromPort" | sudo tee -a /etc/tor/torrc
echo "use with the port: $toPort"
echo ""
if [ ${#toPort2} -gt 0 ]; then
alreadyThere=$(sudo cat /etc/tor/torrc 2>/dev/null | grep -c "\b127.0.0.1:$fromPort2\b")
if [ ${alreadyThere} -eq 0 ]; then
echo "or the port: $toPort2"
else