Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package/gargoyle-tor/files/tor.firewall
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
. /usr/lib/bwmon-gargoyle/functions.sh

bwmonscript="/usr/lib/bwmon-gargoyle/bwmon-gargoyle.d/050-tor.bwmon"
tmp_cron="/tmp/tmp.tor.cron"

if [ -f /tmp/tor.firewall.running ] ; then
exit
Expand Down
8 changes: 7 additions & 1 deletion package/gargoyle/files/usr/lib/gargoyle/manage_groups.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for group in $groups; do
done

# Remove sets whose group no longer exists in UCI
for existing in $(nft list sets "$NFT_FAMILY" "$NFT_TABLE" 2>/dev/null | awk '/set grp_/{print $2}'); do
for existing in $(nft list table "$NFT_FAMILY" "$NFT_TABLE" 2>/dev/null | awk '/set grp_/{print $2}'); do
found=0
for wanted in $desired_sets; do
[ "$existing" = "$wanted" ] && found=1 && break
Expand All @@ -60,3 +60,9 @@ for group in $groups; do
[ -n "$ip" ] && nft add element "$NFT_FAMILY" "$NFT_TABLE" "$setname" \{ "$ip" \} 2>/dev/null
done
done

# Without this, the script's exit code is whatever its last internal [ -n "$ip" ]
# check happened to evaluate to - a caller checking $? would see a spurious
# failure whenever the last device processed simply had no active lease yet,
# even though the script completed all its work correctly.
exit 0
8 changes: 7 additions & 1 deletion package/gargoyle/files/usr/lib/gargoyle/restart_firewall.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This program is copyright � 2008 Eric Bishop and is distributed under the terms of the GNU GPL
# This program is copyright � 2008 Eric Bishop and is distributed under the terms of the GNU GPL
# version 2.0 with a special clarification/exception that permits adapting the program to
# configure proprietary "back end" software provided that all modifications to the web interface
# itself remain covered by the GPL.
Expand Down Expand Up @@ -27,3 +27,9 @@ service_enabled miniupnpd && /etc/init.d/miniupnpd start
service_enabled bwmon_gargoyle && /etc/init.d/bwmon_gargoyle start
service_enabled webmon_gargoyle && /etc/init.d/webmon_gargoyle start

# Without this, the script's exit code is whatever the last "service_enabled
# X && /etc/init.d/X start" happened to evaluate to - a caller checking $?
# sees a spurious failure whenever the last-checked optional service simply
# isn't enabled, even though the firewall restart itself succeeded.
exit 0