summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--CHANGELOG4
-rw-r--r--PKGBUILD4
-rw-r--r--madsonic.install15
-rw-r--r--madsonic.service1
5 files changed, 24 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 75920fe1f4ed..d204c6d17957 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = madsonic
pkgdesc = Madsonic Mashup Mod is a fork of the Subsonic 4.8 Server Build 3436 with some Subsonic Data schema modifications!
pkgver = 5.1.5250
- pkgrel = 1
+ pkgrel = 2
url = http://madsonic.org/
install = madsonic.install
changelog = CHANGELOG
@@ -24,7 +24,7 @@ pkgbase = madsonic
source = enable_config.patch
source = madsonic.conf
md5sums = 6fec9f9804b26d5105c6da83ae86df4f
- md5sums = 009262cf1618ff4827142943659d1800
+ md5sums = 67f335ebe2755d8af0ffa209c7e5b9c4
md5sums = 14518e65fbd97825e24f5801a5f723ad
md5sums = c590d9cb9e21a99b9cb29e224365c938
diff --git a/CHANGELOG b/CHANGELOG
index 7daec5ca7c6e..ee331f50654e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,9 @@
Madsonic 5.1 (stable) Changelog
+Server 5.1.5250 - 2015-08-13 PKGREL 2
+--------------------------------------------
+* New: Madsonic service now runs as madsonic user, rather than root.
+
Server 5.1.5250 - 2015-08-13
--------------------------------------------
+ New: Fixed taglib build error
diff --git a/PKGBUILD b/PKGBUILD
index 86bbea8c7de9..3ea7f0f4192d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ pkgname=madsonic
pkgver=5.1.5250
pkgvera=5.1
pkgdate=20150813
-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!"
arch=('i686' 'x86_64')
url="http://madsonic.org/"
@@ -35,6 +35,6 @@ package() {
md5sums=('6fec9f9804b26d5105c6da83ae86df4f'
- '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