summarylogtreecommitdiffstats
path: root/logitechmediaserver.install
blob: 577b8a3b35176ca97180fbedeed57c5744c66113 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
post_install() {
	getent group logitechms &>/dev/null || groupadd -r logitechms >/dev/null
	getent passwd logitechms &>/dev/null || useradd -r -g logitechms -d /opt/logitechmediaserver-bin -c 'Logitech Media Server' -s /bin/false logitechms >/dev/null
	post_upgrade
}

post_upgrade() {
	mkdir -p /opt/logitechmediaserver-bin/{cache,Logs,prefs{,/plugin},Plugins}
	touch /opt/logitechmediaserver-bin/Logs/slimserver.log
	chown -R logitechms:logitechms /opt/logitechmediaserver-bin
}

post_remove() {
	getent passwd logitechms &>/dev/null && userdel logitechms >/dev/null
	getent group logitechms &>/dev/null && groupdel logitechms >/dev/null || true
}