fix somtimes force to jdownloader user

Exemple on synology docker interface env variable can't be empty and even if i put 0 to UID and GID this script force to "jdownloader user" and after that i've got some error (cannot access to download directory)
This commit is contained in:
thelittlefireman 2017-09-30 16:23:52 +02:00 committed by GitHub
parent 7e696d6fee
commit 7cbcde75f8

View file

@ -7,7 +7,7 @@ function stopJD2 {
exit
}
if [ "$GID" ]
if [ "$GID" ] && [ "$GID" -ne "0" ]
then
GROUP=jdownloader
groupadd -g $GID $GROUP
@ -15,7 +15,7 @@ else
GROUP=root
fi
if [ "$UID" ]
if [ "$UID" ] && [ "$UID" -ne "0" ]
then
USER=jdownloader
useradd -r -N -s /bin/false -u $UID $USER