Skip to content

Commit

Permalink
Verify the integrity of JDownloader.jar during startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesage committed Nov 20, 2024
1 parent 6a8a6b4 commit c400427
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rootfs/etc/cont-init.d/55-jdownloader2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ if [ -f /config/.fix_jd_install ]; then
rm /config/.fix_jd_install
fi

# Remove JDownloader.jar if it has been corrupted.
if [ -f /config/JDownloader.jar ]; then
if ! unzip -t /config/JDownloader.jar 2>/dev/null; then
echo "JDownloader.jar corrupted, removing."
rm /config/JDownloader.jar
fi
fi

# Set default configuration on new install.
[ -f /config/JDownloader.jar ] || {
cp -v /defaults/JDownloader.jar /config/JDownloader.jar
Expand Down

0 comments on commit c400427

Please sign in to comment.