Surpress error on clean old backups from temp (#1413)

Added the -f option to the rm of old backups, as the resulting error message "No such file or directory" (if no files were deleted) might be confusing to others and seen as a problem.
This commit is contained in:
Candle 2020-08-08 22:49:05 +02:00 committed by GitHub
parent 59dae5bda4
commit c84ed5ca16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,7 @@ if [ "$1" = "export" ]; then
fi
# clean old backups from temp
rm /hdd/temp/raspiblitz-*.tar.gz 2>/dev/null
rm -f /hdd/temp/raspiblitz-*.tar.gz 2>/dev/null
# get date stamp
datestamp=$(date "+%y-%m-%d-%H-%M")
@ -410,4 +410,4 @@ if [ "$1" = "import-gui" ]; then
fi
echo "error='unkown command'"
exit 1
exit 1