From 3fc0d483fe4a0623bdbc683e001fa90a064e5687 Mon Sep 17 00:00:00 2001 From: Jay MOULIN Date: Fri, 20 Dec 2024 16:35:56 +0100 Subject: [PATCH] fixes #134,#132 - removes Core.jar in case of unatomic update process --- daemon.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon.sh b/daemon.sh index 0b97460..4d2f8bb 100755 --- a/daemon.sh +++ b/daemon.sh @@ -29,6 +29,7 @@ fi # Copy if no JDownloader exists if [ ! -f /opt/JDownloader/app/JDownloader.jar ]; then + rm /opt/JDownloader/app/Core.jar cp /opt/JDownloader/JDownloader.jar /opt/JDownloader/app/ fi @@ -36,10 +37,12 @@ fi jar tvf /opt/JDownloader/app/JDownloader.jar > /dev/null 2>&1 if [ $? -ne 0 ]; then rm /opt/JDownloader/app/JDownloader.jar + rm /opt/JDownloader/app/Core.jar fi # Check if JDownloader.jar exists, or if there is an interrupted update if [ ! -f /opt/JDownloader/app/JDownloader.jar ] && [ -f /opt/JDownloader/app/tmp/update/self/JDU/JDownloader.jar ]; then + rm /opt/JDownloader/app/Core.jar cp /opt/JDownloader/app/tmp/update/self/JDU/JDownloader.jar /opt/JDownloader/app/ fi