Files
ProxLB/debian/postinst
2025-03-18 08:40:28 +01:00

17 lines
454 B
Bash
Executable File

#!/bin/bash
set -e
#DEBHELPER#
if [ "$1" = "configure" ]; then
systemctl enable proxlb.service
systemctl restart proxlb.service || true
# Create the 'plb' user if it does not exist
if ! id "plb" &>/dev/null; then
useradd --system --home /var/lib/proxlb --create-home --shell /usr/sbin/nologin --group nogroup plb
echo "User 'plb' created."
else
echo "User 'plb' already exists, skipping creation."
fi
fi