ffplayout/debian/postinst

30 lines
698 B
Plaintext
Raw Normal View History

#DEBHELPER#
2022-07-19 06:11:14 -04:00
sysUser="ffpu"
if [ $(id -u $sysUser 2>/dev/null || echo -1) -ge -1 ]; then
adduser --system $sysUser
2022-07-19 06:11:14 -04:00
fi
if [ ! -d "/usr/share/ffplayout/db" ]; then
mkdir "/usr/share/ffplayout/db"
2022-07-19 07:34:31 -04:00
mkdir -p "/var/lib/ffplayout/playlists"
2022-07-19 06:11:14 -04:00
mkdir "/var/lib/ffplayout/tv-media"
IP=$(hostname -I | cut -d ' ' -f1)
2022-12-20 03:24:54 -05:00
/usr/bin/ffpapi -i -d "${IP}:8787"
2022-07-19 06:11:14 -04:00
chown -R ${sysUser}. "/usr/share/ffplayout"
chown -R ${sysUser}. "/var/lib/ffplayout"
chown -R ${sysUser}. "/etc/ffplayout"
2022-07-25 11:26:49 -04:00
ln -s "/var/lib/ffplayout/tv-media" "/usr/share/ffplayout/public/"
fi
2022-07-07 15:12:59 -04:00
if [ ! -d "/var/log/ffplayout" ]; then
2022-07-19 06:11:14 -04:00
mkdir "/var/log/ffplayout"
2022-07-07 15:12:59 -04:00
2022-07-19 06:11:14 -04:00
chown ${sysUser}. "/var/log/ffplayout"
2022-07-07 15:12:59 -04:00
fi