mirror of
https://github.com/SuperBFG7/ympd
synced 2025-01-27 01:14:53 +00:00
Fix: run myMPD under myMPD user
This commit is contained in:
parent
d799fe1e87
commit
8490303b97
@ -7,6 +7,7 @@ then
|
||||
fi
|
||||
|
||||
mkdir -p /etc/mympd/ssl/ca/certs
|
||||
chmod 700 /etc/mympd/ssl
|
||||
cd /etc/mympd/ssl/ca
|
||||
|
||||
echo '01' > serial
|
||||
@ -98,3 +99,5 @@ openssl ca -in server.csr -cert ca/ca.pem -keyfile ca/ca.key -config ca/ca.cnf \
|
||||
rm server.csr
|
||||
rm ca/ca.cnf
|
||||
rm req.cnf
|
||||
|
||||
chown -R mympd.mympd /etc/mympd/
|
@ -4,13 +4,13 @@
|
||||
# (c) 2018 Juergen Mang <mail@jcgames.de
|
||||
|
||||
Name: myMPD
|
||||
Version: master
|
||||
Version: devel
|
||||
Release: 0
|
||||
License: GPL-2.0
|
||||
Group: Productivity/Multimedia/Sound/Players
|
||||
Summary: Standalone webclient for mpd
|
||||
Url: https://github.com/jcorporation/myMPD
|
||||
Source: https://github.com/jcorporation/myMPD/archive/master.zip
|
||||
Source: https://github.com/jcorporation/myMPD/archive/devel.zip
|
||||
BuildRequires: gcc
|
||||
BuildRequires: cmake
|
||||
BuildRequires: unzip
|
||||
@ -39,7 +39,12 @@ make install DESTDIR=%{buildroot}
|
||||
|
||||
%post
|
||||
/usr/share/mympd/crcert.sh
|
||||
chown nobody /var/lib/mympd
|
||||
getent group mympd > /dev/null
|
||||
[ "$?" == "2" ] && groupadd mympd
|
||||
getent passwd mympd > /dev/null
|
||||
[ "$?" == "2" ] && useradd mympd -g mympd
|
||||
chown -R mympd /var/lib/mympd
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
|
@ -15,7 +15,7 @@ sslcert = /etc/mympd/ssl/server.pem
|
||||
sslkey = /etc/mympd/ssl/server.key
|
||||
|
||||
#myMPD user
|
||||
user = nobody
|
||||
user = mympd
|
||||
|
||||
#Port for mpd http stream
|
||||
streamport = 8000
|
||||
|
@ -50,7 +50,11 @@ sudo make install
|
||||
cd ..
|
||||
|
||||
echo "Fixing ownership of /var/lib/mympd"
|
||||
sudo chown nobody /var/lib/mympd
|
||||
getent group mympd > /dev/null
|
||||
[ "$?" == "2" ] && sudo groupadd mympd
|
||||
getent passwd mympd > /dev/null
|
||||
[ "$?" == "2" ] && sudo useradd mympd -g mympd
|
||||
sudo chown -R mympd.mympd /var/lib/mympd
|
||||
|
||||
echo "Trying to link musicdir to library"
|
||||
if [ -f /etc/mpd.conf ]
|
||||
|
Loading…
Reference in New Issue
Block a user