only check if the file actually is there (#2253)

This commit is contained in:
Daniel Hansson 2022-03-04 22:10:32 +01:00 committed by GitHub
parent d5b2af0b03
commit e6d26168bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,10 +195,13 @@ then
fi
else
# Only update if it's older than 60 days (60 seconds * 60 minutes * 24 hours * 60 days)
if [ "$(stat --format=%Y "$SCRIPTS"/nextcloud.sh)" -le "$(( $(date +%s) - ((60*60*24*60)) ))" ]
if [ -f "$SCRIPTS"/nextcloud.sh ]
then
download_script STATIC nextcloud
chown "$CURRUSR":"$CURRUSR" "$SCRIPTS"/nextcloud.sh
if [ "$(stat --format=%Y "$SCRIPTS"/nextcloud.sh)" -le "$(( $(date +%s) - ((60*60*24*60)) ))" ]
then
download_script STATIC nextcloud
chown "$CURRUSR":"$CURRUSR" "$SCRIPTS"/nextcloud.sh
fi
fi
fi