Files
guard/deploy/debian/prerm
T
abrown38andClaude Opus 5.5 d06bf8d531 Guard: watch logs, ban misbehaving addresses in Housecarl
Files and the journal, patterns with one <IP>, bounties within a window,
bans in a Housecarl ban list with repeat offenders' bans growing; presets
for sshd, jarl, housecarl, steward, bind-xfr, postfix-sasl, dovecot,
nginx-auth and housecarl-drops; guard run/check/test/status/bans/ban/unban;
a Debian package with a sandboxed unit; an end-to-end test with Housecarl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:29:37 +01:00

11 lines
262 B
Bash
Executable File

#!/bin/sh
# Guard: runs before the package's files are removed (also on upgrades).
set -e
if [ "$1" = remove ] && [ -d /run/systemd/system ]; then
systemctl stop guard.service 2>/dev/null || true
systemctl disable guard.service 2>/dev/null || true
fi
exit 0