summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--madsonic.install15
-rw-r--r--madsonic.service1
4 files changed, 20 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 10a96802202d..252b2556fb32 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = madsonic-beta
pkgdesc = Madsonic Mashup Mod is a fork of the Subsonic 4.8 Server Build 3436 with some Subsonic Data schema modifications! This is the latest Beta 5.1 Build.
pkgver = 5.1.5260
- pkgrel = 1
+ pkgrel = 2
url = http://madsonic.org/
install = madsonic.install
changelog = CHANGELOG
@@ -24,7 +24,7 @@ pkgbase = madsonic-beta
source = enable_config.patch
source = madsonic.conf
md5sums = 30b90f30469b9b46e5a34e13a42a1fe5
- md5sums = 009262cf1618ff4827142943659d1800
+ md5sums = 67f335ebe2755d8af0ffa209c7e5b9c4
md5sums = 14518e65fbd97825e24f5801a5f723ad
md5sums = c590d9cb9e21a99b9cb29e224365c938
diff --git a/PKGBUILD b/PKGBUILD
index 05b2a206ff42..55bb55feda1e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ pkgname=madsonic-beta
pkgver=5.1.5260
pkgvera=5.1
pkgdate=20150831
-pkgrel=1
+pkgrel=2
pkgdesc="Madsonic Mashup Mod is a fork of the Subsonic 4.8 Server Build 3436 with some Subsonic Data schema modifications! This is the latest Beta 5.1 Build."
arch=('i686' 'x86_64')
url="http://madsonic.org/"
@@ -36,6 +36,6 @@ package() {
md5sums=('30b90f30469b9b46e5a34e13a42a1fe5'
- '009262cf1618ff4827142943659d1800'
+ '67f335ebe2755d8af0ffa209c7e5b9c4'
'14518e65fbd97825e24f5801a5f723ad'
'c590d9cb9e21a99b9cb29e224365c938' )
diff --git a/madsonic.install b/madsonic.install
index 200a907cb7a8..61235e113d95 100644
--- a/madsonic.install
+++ b/madsonic.install
@@ -1,4 +1,6 @@
post_install() {
+ useradd -d /var/madsonic -MrU madsonic
+ chown -R madsonic:madsonic /var/madsonic
systemctl daemon-reload &> /dev/null
echo "*************************************************"
echo "* Edit /etc/madsonic.conf to configure madsonic *"
@@ -7,8 +9,21 @@ post_install() {
}
post_upgrade(){
+ useradd -d /var/madsonic -MrU madsonic
+ chown -R madsonic:madsonic /var/madsonic
systemctl daemon-reload &> /dev/null
echo -e "\033[31;1mIf upgrading from 5.1.5200 or earlier, and you have customized your madsonic.sh, you will need to manually replace \n\t\033[37m /var/madsonic/madsonic.sh \033[31m with \033[37m /var/madsonic/madsonic.sh.pacnew \033[31m \nfor /etc/madsonic.conf to be recognized.\033[0m"
+ echo -e "\nMadsonic now runs under the \033[1mmadsonic\033[0m user. You may need to adjust the permissions of any external music directories to allow madsonic access.\n"
+
+ systemctl is-active madsonic.service >/dev/null && systemctl restart madsonic.service
}
+pre_remove(){
+ systemctl stop madsonic
+}
+
+post_remove(){
+ userdel madsonic
+}
+
diff --git a/madsonic.service b/madsonic.service
index e92149597a97..cca0aab4365c 100644
--- a/madsonic.service
+++ b/madsonic.service
@@ -6,6 +6,7 @@ After=network.target
ExecStart=/var/madsonic/madsonic.sh
ExecStop=/bin/kill -15 $MAINPID
Type=forking
+User=madsonic
[Install]
WantedBy=multi-user.target