Files
package-repo/sources/eendoe_hyperdeck/packaging/eendoe-hyperdeck/DEBIAN/postinst
T
bart 9cc903b2a4
Build and Publish Debian Packages / Build Packages (push) Failing after 18s
Build and Publish Debian Packages / Publish to eendoe repository (push) Skipped
Initial import: sources, staging packages, build scripts and CI workflow
2026-10-20 21:20:13 +02:00

42 lines
931 B
Bash
Executable File

#!/bin/bash
#set -e
case "$1" in
configure|abort-upgrade)
id -u vid &>/dev/null || useradd --system -m vid
runuser -l vid -c "pip3 install -r /usr/share/hyperdeck/requirements.txt"
FILE="/etc/hyperdeck/config.json"
SOURCEFILE="/usr/share/hyperdeck/config.json.orig"
if [ -f "$FILE" ]; then
echo "$FILE exists."
else
mkdir -p /etc/hyperdeck/
echo "Copy default config"
cp "$SOURCEFILE" "$FILE"
chmod 744 "$FILE"
fi
systemd-notify --booted
if [ "$?" -eq 0 ]
then
echo "Systemd running, registering service"
systemctl daemon-reload && systemctl enable hyperdeck
else
echo "Systemd not running, skipping"
fi
mkdir -p /var/log/hyperdeck/
chown vid:vid "/var/log/hyperdeck/"
echo "Installation done"
;;
esac
exit 0