diff --git a/Dockerfile b/Dockerfile index d558922..fe4eb78 100755 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ ENV UMASK='' COPY ./${TARGETPLATFORM}/*.jar /opt/JDownloader/libs/ # archive extraction uses sevenzipjbinding library # which is compiled against libstdc++ -RUN mkdir -p /opt/JDownloader/app +RUN mkdir -p /opt/JDownloader/app/libs COPY daemon.sh /opt/JDownloader/ COPY default-config.json.dist /opt/JDownloader/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json.dist diff --git a/daemon.sh b/daemon.sh index 9d33a7c..339e4c5 100755 --- a/daemon.sh +++ b/daemon.sh @@ -62,7 +62,11 @@ if echo "$UMASK" | grep -Eq '0[0-7]{3}' ; then umask "$UMASK" fi -su jdown -s /bin/sh -c 'java -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Djava.awt.headless=true -jar /opt/JDownloader/app/JDownloader.jar -norestart' & +if [ -m "$PUID" ]; then + su jdown -s /bin/sh -c 'java -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Djava.awt.headless=true -jar /opt/JDownloader/app/JDownloader.jar -norestart' & +else + java -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Djava.awt.headless=true -jar /opt/JDownloader/app/JDownloader.jar -norestart & +fi PID=$! while [ "$PID" ] do