diff --git a/java/entrypoint.sh b/java/entrypoint.sh index 737bf2e..271833d 100644 --- a/java/entrypoint.sh +++ b/java/entrypoint.sh @@ -25,18 +25,17 @@ JAVA_MAJOR_VERSION=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | aw if [[ "$MALWARE_SCAN" == "1" ]]; then if [[ ! -f "/MCAntiMalware.jar" ]]; then echo -e "${LOG_PREFIX} Malware scanning is only available for Java 17 and above, skipping..." - MALWARE_SCAN=0 - fi - - echo -e "${LOG_PREFIX} Scanning for malware... (This may take a while)" + else + echo -e "${LOG_PREFIX} Scanning for malware... (This may take a while)" - java -jar /MCAntiMalware.jar --scanDirectory . --singleScan true --disableAutoUpdate true + java -jar /MCAntiMalware.jar --scanDirectory . --singleScan true --disableAutoUpdate true - if [ $? -eq 0 ]; then - echo -e "${LOG_PREFIX} Malware scan has passed" - else - echo -e "${LOG_PREFIX} Malware scan has failed" - exit 1 + if [ $? -eq 0 ]; then + echo -e "${LOG_PREFIX} Malware scan has passed" + else + echo -e "${LOG_PREFIX} Malware scan has failed" + exit 1 + fi fi else echo -e "${LOG_PREFIX} Skipping malware scan..."