Nftables to go
This commit is contained in:
15
update.sh
15
update.sh
@@ -20,16 +20,15 @@ for service in "./services"/*/; do
|
||||
source ./update.sh
|
||||
fi
|
||||
|
||||
# Symlink and activate each *.policy.json
|
||||
for policy in *.policy.json; do
|
||||
[ -e "$policy" ] || continue
|
||||
POLICY_NAME="${policy%.policy.json}"
|
||||
ln -sf "./$policy" "/etc/awall/optional/$POLICY_NAME.json"
|
||||
awall enable "$POLICY_NAME"
|
||||
# Symlink all caddy configs
|
||||
for caddyfile in *.caddy; do
|
||||
[ -e "$caddyfile" ] || continue
|
||||
CADDY_NAME="${caddyfile%.caddy}"
|
||||
ln -sf "./$caddyfile" "/etc/caddy/$CADDY_NAME"
|
||||
done
|
||||
|
||||
cd "$base_dir"
|
||||
done
|
||||
|
||||
echo "Activating firewall..."
|
||||
awall activate
|
||||
echo "Restarting caddy..."
|
||||
rc-service caddy restart
|
||||
Reference in New Issue
Block a user