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