From 7cbcde75f8a02ca75541c27e07dcb2bf4e594c55 Mon Sep 17 00:00:00 2001 From: thelittlefireman Date: Sat, 30 Sep 2017 16:23:52 +0200 Subject: [PATCH] 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) --- startJD2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/startJD2.sh b/startJD2.sh index fd0e098..6e68d88 100755 --- a/startJD2.sh +++ b/startJD2.sh @@ -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