Add a postinst script

This commit is contained in:
2025-07-06 17:06:38 +02:00
parent 9e4496de19
commit d0bfabcf15

21
snow-scanner/debian/postinst Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# postinst script for snow-scanner
set -eu
if [ "$1" = "configure" ]; then
if ! getent passwd | grep -q "^snow-scanner:"; then
useradd --shell /bin/sh snow-scanner
fi
if [ ! -d /etc/snow-scanner ]; then
mkdir /etc/snow-scanner
chown snow-scanner:snow-scanner /etc/snow-scanner
chmod 770 /etc/snow-scanner
fi
fi
#DEBHELPER#
exit 0