packages/net/fail2ban/files/fail2ban.defaults
Kerma Gérald e34396fd0e fail2ban: initial package of fail2ban version 0.11.2
python3-pyinotify: initial package version 0.9.6 of pyinotify for python3

Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2021-09-01 14:08:17 -07:00

13 lines
434 B
Bash

#!/bin/sh
# unfortunately, UCI doesn't provide a nice way to add an anonymous section only if it doesn't already exist
if ! uci show firewall | grep -q firewall.fail2ban; then
name="$(uci add firewall include)"
uci set "firewall.${name}.path=/etc/firewall.fail2ban"
uci set "firewall.${name}.enabled=1"
uci set "firewall.${name}.reload=1"
echo -e "Adding the following UCI config:\n $(uci changes)"
uci commit
fi
exit 0