debmaker/ressources/picapport/rootfs/DEBIAN/postinst
2025-04-14 18:51:11 +02:00

14 lines
334 B
Bash
Executable file

#!/bin/bash
APP=picapport
id $APP &> /dev/null || useradd $APP -r -s /bin/false -md /var/lib/$APP/
chown -R $APP:$APP /var/lib/$APP/
if [[ $(systemctl list-unit-files | grep ${APP}.services) -eq 0 ]]
then
systemctl daemon-reload
if [ "$(systemctl is-active ${APP}.service)" != "inactive" ]
then
systemctl restart ${APP}
fi
fi