1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-01-27 01:14:53 +00:00

Fix: add mympd user & group as system user & group #51

This commit is contained in:
jcorporation 2018-09-12 21:30:24 +01:00
parent 3181db53a5
commit 0eb2e11bee
3 changed files with 6 additions and 6 deletions

View File

@ -39,9 +39,9 @@ make install DESTDIR=%{buildroot}
%post
getent group mympd > /dev/null
[ "$?" = "2" ] && groupadd mympd
[ "$?" = "2" ] && groupadd -r mympd
getent passwd mympd > /dev/null
[ "$?" = "2" ] && useradd mympd -g mympd -d /var/lib/mympd -s /usr/sbin/nologin
[ "$?" = "2" ] && useradd -r mympd -g mympd -d /var/lib/mympd -s /usr/sbin/nologin
if [ -d /usr/lib/systemd/ ]
then
[ -d /usr/lib/systemd/system ] || sudo mkdir /usr/lib/systemd/system

4
debian/postinst vendored
View File

@ -2,9 +2,9 @@
echo "Fixing ownership of /var/lib/mympd"
getent group mympd > /dev/null
[ "$?" = "2" ] && groupadd mympd
[ "$?" = "2" ] && groupadd -r mympd
getent passwd mympd > /dev/null
[ "$?" = "2" ] && useradd mympd -g mympd-d /var/lib/mympd -s /usr/sbin/nologin
[ "$?" = "2" ] && useradd -r mympd -g mympd-d /var/lib/mympd -s /usr/sbin/nologin
chown -R mympd.mympd /var/lib/mympd

View File

@ -51,9 +51,9 @@ cd ..
echo "Fixing ownership of /var/lib/mympd"
getent group mympd > /dev/null
[ "$?" = "2" ] && sudo groupadd mympd
[ "$?" = "2" ] && sudo groupadd -r mympd
getent passwd mympd > /dev/null
[ "$?" = "2" ] && sudo useradd mympd -g mympd -d /var/lib/mympd -s /usr/sbin/nologin
[ "$?" = "2" ] && sudo useradd -r mympd -g mympd -d /var/lib/mympd -s /usr/sbin/nologin
sudo chown -R mympd.mympd /var/lib/mympd
echo "Trying to link musicdir to library"