ffplayout/debian/postinst

19 lines
497 B
Plaintext
Raw Normal View History

#DEBHELPER#
if [ ! -d "/usr/share/ffplayout/db" ]; then
mkdir "/usr/share/ffplayout/db"
chmod 777 "/usr/share/ffplayout/db"
/usr/bin/ffpapi -i
2022-06-27 08:55:34 -04:00
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