Add picapport
This commit is contained in:
parent
51e86e6b36
commit
6c4f22d566
11 changed files with 147 additions and 0 deletions
16
ressources/picapport/rootfs/DEBIAN/postinst
Executable file
16
ressources/picapport/rootfs/DEBIAN/postinst
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
APP=picapport
|
||||
|
||||
id ${APP} &> /dev/null || useradd ${APP} -r -s /bin/false -d /var/lib/${APP}
|
||||
|
||||
chown ${APP}:${APP} /var/lib/${APP}/
|
||||
chown ${APP}:${APP} /var/lib/${APP}/*
|
||||
|
||||
if [[ $(systemctl list-unit-files | grep picapport.services) -eq 0 ]]
|
||||
then
|
||||
systemctl daemon-reload
|
||||
if [ "$(systemctl is-active ${APP}.service)" != "inactive" ]
|
||||
then
|
||||
systemctl restart ${APP}
|
||||
fi
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue