Skip to content

Commit

Permalink
Fixes crash on missing libs in app + unexisting user when no workarou…
Browse files Browse the repository at this point in the history
…nd user used
  • Loading branch information
jaymoulin committed Dec 22, 2024
1 parent f26c574 commit 8988523
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8988523

Please sign in to comment.