add postinst to rpm
This commit is contained in:
parent
ec00367901
commit
1494cbfdac
10
debian/postinst
vendored
10
debian/postinst
vendored
@ -6,5 +6,13 @@ if [ ! -d "/usr/share/ffplayout/db" ]; then
|
|||||||
|
|
||||||
/usr/bin/ffpapi -i
|
/usr/bin/ffpapi -i
|
||||||
|
|
||||||
chown www-data. "/usr/share/ffplayout/db/ffplayout.db"
|
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
|
fi
|
||||||
|
@ -70,4 +70,7 @@ assets = [
|
|||||||
{ source = "../README.md", dest = "/usr/share/doc/ffplayout/README", mode = "644", doc = true },
|
{ source = "../README.md", dest = "/usr/share/doc/ffplayout/README", mode = "644", doc = true },
|
||||||
{ source = "../LICENSE", dest = "/usr/share/doc/ffplayout/LICENSE", mode = "644" },
|
{ source = "../LICENSE", dest = "/usr/share/doc/ffplayout/LICENSE", mode = "644" },
|
||||||
{ source = "../assets/logo.png", dest = "/usr/share/ffplayout/logo.png", mode = "644" },
|
{ source = "../assets/logo.png", dest = "/usr/share/ffplayout/logo.png", mode = "644" },
|
||||||
|
{ source = "../debian/postinst", dest = "/usr/share/ffplayout/postinst", mode = "755" },
|
||||||
]
|
]
|
||||||
|
auto-req = "no"
|
||||||
|
post_install_script = "/usr/share/ffplayout/postinst"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user