From 144767ebb29eecf7358509cbcafb05426fec93d9 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Sun, 16 Apr 2023 00:35:20 +0000 Subject: [PATCH] Fix issue detecting the rules file. --- files/tor-router | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/files/tor-router b/files/tor-router index 0d5590f..a0c7d0c 100755 --- a/files/tor-router +++ b/files/tor-router @@ -59,14 +59,14 @@ case "$1" in fi ;; stop) - if ! -f "$RULES"; then - echo "$RULES does not exist. Not doing anything." - exit - else + if test -f "$RULES"; then echo "Restoring previous rules from $RULES" iptables -t nat -F - iptables-restore < $RULES - rm $RULES + iptables-restore < "$RULES" + rm "$RULES" + else + echo "$RULES does not exist. Not doing anything." + exit fi ;; restart)