foodoord/debian/DEBIAN/postinst

18 lines
412 B
Plaintext
Raw Normal View History

2022-04-15 16:17:58 +00:00
#!/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