Files
fail2ban-p2p/debian/preinst
2026-04-22 23:56:12 +02:00

23 lines
569 B
Bash
Executable File

#!/bin/sh
set -e
case "$1" in
install|upgrade)
if ! getent group fail2ban-p2p >/dev/null; then
addgroup --system fail2ban-p2p >/dev/null
fi
if ! getent passwd fail2ban-p2p >/dev/null; then
adduser \
--system \
--ingroup fail2ban-p2p \
--home /var/lib/fail2ban-p2p \
--no-create-home \
--shell /usr/sbin/nologin \
--gecos "fail2ban-p2p daemon" \
fail2ban-p2p >/dev/null
fi
;;
esac
exit 0