Ajout d'un test avant de supprimer le fichier d'erreur

This commit is contained in:
Damien Broqua 2022-11-15 16:51:52 +01:00
parent 6627373db6
commit b1d6c93f00

View file

@ -97,7 +97,9 @@ fi
if [ $? == 0 ] ; then
echo `date` > ${ORIG}lastBackup
echo "Method: ${TYPE}" >> ${ORIG}/lastBackup
rm ${ORIG}lastFailBackup
if [ -f "${ORIG}lastFailBackup}" ]; then
rm ${ORIG}lastFailBackup
fi
else
echo `date` > ${ORIG}lastFailBackup
echo "Method: ${TYPE}" >> ${ORIG}lastFailBackup