ffplayout/debian/postinst
2022-06-27 14:55:34 +02:00

19 lines
497 B
Plaintext

#DEBHELPER#
if [ ! -d "/usr/share/ffplayout/db" ]; then
mkdir "/usr/share/ffplayout/db"
chmod 777 "/usr/share/ffplayout/db"
/usr/bin/ffpapi -i
if id "www-data" &>/dev/null; then
chown www-data. "/usr/share/ffplayout/db/ffplayout.db"
else
sed -i "s|www-data|root|g" /lib/systemd/system/ffpapi.service
sed -i "s|www-data|root|g" /lib/systemd/system/ffplayout.service
rm -f /etc/sudoers.d/11-ffplayout
systemctl daemon-reload
fi
fi