forked from folhabranca/minidlna
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathminidlna.install
22 lines (19 loc) · 863 Bytes
/
minidlna.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package() {
install -Dm644 minidlna.conf /usr/local/etc/minidlna.conf
install -Dm0644 minidlna.tmpfiles /usr/lib/tmpfiles.d/minidlna.conf
install -Dm0644 minidlna.service /lib/systemd/system/minidlna.service
install -Dm644 minidlna.conf.5 /usr/local/share/man/man5/minidlna.conf.5
install -Dm644 minidlnad.8 /usr/local/share/man/man8/minidlnad.8
}
post_install() {
getent group minidlna &>/dev/null || groupadd -r minidlna >/dev/null
getent passwd minidlna &> /dev/null || useradd -r -g minidlna -m -d /var/cache/minidlna -s /usr/sbin/nologin minidlna >/dev/null
systemd-tmpfiles --create minidlna.conf
}
post_remove() {
# Ensure that minidlna is not running
systemctl stop minidlna &>/dev/null
getent passwd minidlna &>/dev/null && userdel minidlna >/dev/null
getent group minidlna &>/dev/null && groupdel minidlna >/dev/null
true
}