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 if [ $? == 0 ] ; then
echo `date` > ${ORIG}lastBackup echo `date` > ${ORIG}lastBackup
echo "Method: ${TYPE}" >> ${ORIG}/lastBackup echo "Method: ${TYPE}" >> ${ORIG}/lastBackup
if [ -f "${ORIG}lastFailBackup}" ]; then
rm ${ORIG}lastFailBackup rm ${ORIG}lastFailBackup
fi
else else
echo `date` > ${ORIG}lastFailBackup echo `date` > ${ORIG}lastFailBackup
echo "Method: ${TYPE}" >> ${ORIG}lastFailBackup echo "Method: ${TYPE}" >> ${ORIG}lastFailBackup