From f3b04f9459dce9a8d34c55a6752807a2dde49a12 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Wed, 24 May 2023 23:34:03 +0200 Subject: [PATCH] update script backup --- backup_canalblog.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backup_canalblog.sh b/backup_canalblog.sh index 4b87d40..9bb750b 100755 --- a/backup_canalblog.sh +++ b/backup_canalblog.sh @@ -3,8 +3,8 @@ TAR=/usr/bin/tar PYTHON=/usr/bin/python3 GZIP=/usr/bin/gzip -SCRIPTDIR=/home/valentin/script -WEBSCRAP=${SCRIPTDIR}/web_scrap.py +SCRIPTDIR=/home/valentin/script/webscrap +WEBSCRAP=${SCRIPTDIR}/import_export_canalblog.py URL=www.clarissariviere.com DATE=$(date +%Y%m%d) DIRECTORY=/home/valentin/backup @@ -24,8 +24,8 @@ else fi subject="${subject} ${URL} ${DATE}" echo > ${BACKUPDIR}/${LOGFILE} -${PYTHON} ${WEBSCRAP} --url ${URL} --dir ${DIRECTORY} --quiet --logfile ${BACKUPDIR}/${LOGFILE} -if [ ${?} -ne 0 ]; then +${PYTHON} ${WEBSCRAP} --quiet --logfile ${BACKUPDIR}/${LOGFILE} --parallel 20 export --url ${URL} --directory ${DIRECTORY} +if [ ${?} -ne 0 ]; then subject="${subject} echoue : recuperation page" echo ${subject} | mail -s "${subject}" -A ${BACKUPDIR}/${LOGFILE} ${SENDER} exit 1