Debian-Packaging

This commit is contained in:
2022-04-15 18:17:58 +02:00
parent ee44662cd3
commit 3eed323364
12 changed files with 46 additions and 29 deletions

17
debian/DEBIAN/postinst vendored Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
echo "Creating group and users.."
groupadd foodoor
useradd -M -d /var/lib/foodoor/close -G foodoor -s /bin/sh close
useradd -M -d /var/lib/foodoor/open -G foodoor -s /bin/sh open
useradd -M -d /var/lib/foodoor/door -G foodoor -s /bin/sh door
echo "Chown homes"
for u in "close open door"; do
chown ${u}:${u} ${u}
done
echo "Create /state"
touch /state
chgrp root:foodoor /state
chmod 664 /state