Foodoor-Systemd-Service; Paketinstaller fragt nach oben/unten
This commit is contained in:
4
debian/DEBIAN/control
vendored
Normal file → Executable file
4
debian/DEBIAN/control
vendored
Normal file → Executable file
@ -1,6 +1,6 @@
|
||||
Package: foodoord
|
||||
Version: 3.0.3
|
||||
Version: 3.0.4
|
||||
Maintainer: Bandie <bandie@chaospott.de>
|
||||
Architecture: all
|
||||
Description: Control the doors of the club, ja!
|
||||
Depends: dash, git, python3
|
||||
Depends: dash, git, python3, pip, tmux
|
||||
|
19
debian/DEBIAN/postinst
vendored
19
debian/DEBIAN/postinst
vendored
@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
echo "Creating group and users.."
|
||||
groupadd foodoor
|
||||
useradd -M -d /var/lib/foodoor/close -G foodoor -s /bin/sh close
|
||||
@ -12,11 +11,25 @@ for u in close open door; do
|
||||
chown ${u}:${u} /var/lib/foodoor/${u}
|
||||
done
|
||||
|
||||
echo "Chmod foodoor"
|
||||
chmod 755 /var/lib/foodoor
|
||||
|
||||
echo "Create /state"
|
||||
touch /state
|
||||
chown root:foodoor /state
|
||||
chmod 664 /state
|
||||
|
||||
echo "##################"
|
||||
while [ "$prompt" != "oben" -a "$prompt" != "unten" ]; do
|
||||
read -p "Sind wir oben oder unten? (oben, unten): " prompt
|
||||
done
|
||||
echo "##################"
|
||||
|
||||
echo "Installing dependencies via pip: pifacecommon pifacedigitalio"
|
||||
pip install pifacecommon pifacedigitalio
|
||||
|
||||
echo "Enabling and starting systemd-Services"
|
||||
systemctl daemon-reload
|
||||
systemctl enable foodoord
|
||||
systemctl restart foodoord
|
||||
systemctl enable foodoord@$prompt
|
||||
systemctl restart foodoord@$prompt
|
||||
systemctl status foodoord@$prompt
|
||||
|
Reference in New Issue
Block a user