Skip to content

Commit

Permalink
Merge pull request #9 from thelittlefireman/master
Browse files Browse the repository at this point in the history
UID=0 or GID=0 will set default user or group respectively to root.
  • Loading branch information
PlusMinus0 committed Oct 4, 2017
2 parents 7e696d6 + 7cbcde7 commit da75fce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions startJD2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ function stopJD2 {
exit
}

if [ "$GID" ]
if [ "$GID" ] && [ "$GID" -ne "0" ]
then
GROUP=jdownloader
groupadd -g $GID $GROUP
else
GROUP=root
fi

if [ "$UID" ]
if [ "$UID" ] && [ "$UID" -ne "0" ]
then
USER=jdownloader
useradd -r -N -s /bin/false -u $UID $USER
Expand Down

0 comments on commit da75fce

Please sign in to comment.