Skip to content

Commit

Permalink
Fix issue detecting the rules file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Edu4rdSHL authored Apr 16, 2023
1 parent 3a81a3b commit 144767e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions files/tor-router
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 144767e

Please sign in to comment.