mirror of
https://github.com/SuperBFG7/ympd
synced 2025-01-28 01:44:55 +00:00
Fix: add mympd user & group as system user & group #51
This commit is contained in:
parent
3181db53a5
commit
0eb2e11bee
@ -39,9 +39,9 @@ make install DESTDIR=%{buildroot}
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
getent group mympd > /dev/null
|
getent group mympd > /dev/null
|
||||||
[ "$?" = "2" ] && groupadd mympd
|
[ "$?" = "2" ] && groupadd -r mympd
|
||||||
getent passwd mympd > /dev/null
|
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/ ]
|
if [ -d /usr/lib/systemd/ ]
|
||||||
then
|
then
|
||||||
[ -d /usr/lib/systemd/system ] || sudo mkdir /usr/lib/systemd/system
|
[ -d /usr/lib/systemd/system ] || sudo mkdir /usr/lib/systemd/system
|
||||||
|
4
debian/postinst
vendored
4
debian/postinst
vendored
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
echo "Fixing ownership of /var/lib/mympd"
|
echo "Fixing ownership of /var/lib/mympd"
|
||||||
getent group mympd > /dev/null
|
getent group mympd > /dev/null
|
||||||
[ "$?" = "2" ] && groupadd mympd
|
[ "$?" = "2" ] && groupadd -r mympd
|
||||||
getent passwd mympd > /dev/null
|
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
|
chown -R mympd.mympd /var/lib/mympd
|
||||||
|
|
||||||
|
@ -51,9 +51,9 @@ cd ..
|
|||||||
|
|
||||||
echo "Fixing ownership of /var/lib/mympd"
|
echo "Fixing ownership of /var/lib/mympd"
|
||||||
getent group mympd > /dev/null
|
getent group mympd > /dev/null
|
||||||
[ "$?" = "2" ] && sudo groupadd mympd
|
[ "$?" = "2" ] && sudo groupadd -r mympd
|
||||||
getent passwd mympd > /dev/null
|
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
|
sudo chown -R mympd.mympd /var/lib/mympd
|
||||||
|
|
||||||
echo "Trying to link musicdir to library"
|
echo "Trying to link musicdir to library"
|
||||||
|
Loading…
Reference in New Issue
Block a user