Compare commits
2 Commits
f0baee2d91
...
v3.0.1
Author | SHA1 | Date | |
---|---|---|---|
8c232699c3
|
|||
cb05047fed
|
@ -1,2 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
dpkg-deb --root-owner-group -b debian foodoord_3.0.0_all.deb
|
VERSION=3.0.1
|
||||||
|
dpkg-deb --root-owner-group -b debian foodoord_${VERSION}_all.deb
|
||||||
|
3
debian/DEBIAN/control
vendored
3
debian/DEBIAN/control
vendored
@ -1,5 +1,6 @@
|
|||||||
Package: foodoord
|
Package: foodoord
|
||||||
Version: 3.0
|
Version: 3.0.1
|
||||||
Maintainer: Bandie <bandie@chaospott.de>
|
Maintainer: Bandie <bandie@chaospott.de>
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Description: Control the doors of the club, ja!
|
Description: Control the doors of the club, ja!
|
||||||
|
Depends: dash, git, python3
|
||||||
|
11
debian/DEBIAN/postinst
vendored
11
debian/DEBIAN/postinst
vendored
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -x
|
||||||
echo "Creating group and users.."
|
echo "Creating group and users.."
|
||||||
groupadd foodoor
|
groupadd foodoor
|
||||||
useradd -M -d /var/lib/foodoor/close -G foodoor -s /bin/sh close
|
useradd -M -d /var/lib/foodoor/close -G foodoor -s /bin/sh close
|
||||||
@ -6,12 +7,16 @@ 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
|
useradd -M -d /var/lib/foodoor/door -G foodoor -s /bin/sh door
|
||||||
|
|
||||||
echo "Chown homes"
|
echo "Chown homes"
|
||||||
for u in "close open door"; do
|
for u in close open door; do
|
||||||
chown ${u}:${u} ${u}
|
groupadd ${u}
|
||||||
|
chown ${u}:${u} /var/lib/foodoor/${u}
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Create /state"
|
echo "Create /state"
|
||||||
touch /state
|
touch /state
|
||||||
chgrp root:foodoor /state
|
chown root:foodoor /state
|
||||||
chmod 664 /state
|
chmod 664 /state
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable foodoord
|
||||||
|
systemctl restart foodoord
|
||||||
|
2
debian/etc/init.d/foodoord
vendored
2
debian/etc/init.d/foodoord
vendored
@ -16,7 +16,7 @@
|
|||||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
DESC="foodoor daemon"
|
DESC="foodoor daemon"
|
||||||
WHERE=$(cat /etc/foodoord.conf | grep 'where' | awk -F '=' '{ print $2 }')
|
WHERE=$(cat /etc/foodoord.conf | grep 'where' | awk -F '=' '{ print $2 }' | tr -d ' ')
|
||||||
NAME=foodoord_${WHERE}
|
NAME=foodoord_${WHERE}
|
||||||
DAEMON=/usr/sbin/$NAME
|
DAEMON=/usr/sbin/$NAME
|
||||||
#DAEMON_ARGS="--options args"
|
#DAEMON_ARGS="--options args"
|
||||||
|
Reference in New Issue
Block a user