* remove 'http-only' mode, all sources are now fetched from https sites * the backup mode is now mandatory ('/tmp' is the default backup directory), always create and re-use backups if available. To force a re-download take the 'reload' action. * support 'sshd' in addition to 'dropbear' for logfile parsing to detect break-in events * always update the black-/whitelist with logfile parsing results in 'refresh' mode (no new downloads) * rework the return code handling * tweak procd trigger * various small fixes * (s)hellsheck cosmetics Signed-off-by: Dirk Brenken <dev@brenken.org>
11 lines
271 B
Bash
11 lines
271 B
Bash
#!/bin/sh
|
|
#
|
|
ban_pidfile="/var/run/banip.pid"
|
|
ban_enabled="$(/etc/init.d/banip enabled; printf "%u" "${?}")"
|
|
|
|
if [ "${ban_enabled}" = "1" ] || [ ! -f "${ban_pidfile}" ] || [ -s "${ban_pidfile}" ] || [ "${ACTION}" != "add" ]
|
|
then
|
|
exit 0
|
|
else
|
|
/etc/init.d/banip refresh
|
|
fi
|