summaryrefslogtreecommitdiffstats
path: root/abs/extra/community/mpd/mpd.install
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/extra/community/mpd/mpd.install
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/extra/community/mpd/mpd.install')
-rw-r--r--abs/extra/community/mpd/mpd.install23
1 files changed, 23 insertions, 0 deletions
diff --git a/abs/extra/community/mpd/mpd.install b/abs/extra/community/mpd/mpd.install
new file mode 100644
index 0000000..e44c9be
--- /dev/null
+++ b/abs/extra/community/mpd/mpd.install
@@ -0,0 +1,23 @@
+# arg 1: the new package version
+post_install() {
+ echo "==> mpd: Create a config under /etc/mpd.conf before using MPD (Example: /etc/mpd.conf.example)"
+ groupadd -g 45 mpd &>/dev/null
+ useradd -u 45 -g mpd -d /var/lib/mpd -s /bin/true mpd &>/dev/null
+ gpasswd -a mpd audio &>/dev/null
+ chown mpd:mpd -R /var/{lib,log,run}/mpd
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ if [ "$(vercmp $2 0.12)" -lt 0 ]; then
+ echo "==> mpd: upgrade from 0.11 -> 0.12: configuration file syntax changed, "
+ echo "==> mpd: make sure to update your configuration file! example conf: /etc/mpd.conf.example"
+ fi
+ chown mpd:mpd -R /var/{lib,log,run}/mpd
+}
+
+# arg 1: the old package version
+pre_remove() {
+ userdel mpd &>/dev/null
+}