update script backup
This commit is contained in:
parent
a400375e01
commit
f3b04f9459
@ -3,8 +3,8 @@
|
|||||||
TAR=/usr/bin/tar
|
TAR=/usr/bin/tar
|
||||||
PYTHON=/usr/bin/python3
|
PYTHON=/usr/bin/python3
|
||||||
GZIP=/usr/bin/gzip
|
GZIP=/usr/bin/gzip
|
||||||
SCRIPTDIR=/home/valentin/script
|
SCRIPTDIR=/home/valentin/script/webscrap
|
||||||
WEBSCRAP=${SCRIPTDIR}/web_scrap.py
|
WEBSCRAP=${SCRIPTDIR}/import_export_canalblog.py
|
||||||
URL=www.clarissariviere.com
|
URL=www.clarissariviere.com
|
||||||
DATE=$(date +%Y%m%d)
|
DATE=$(date +%Y%m%d)
|
||||||
DIRECTORY=/home/valentin/backup
|
DIRECTORY=/home/valentin/backup
|
||||||
@ -24,8 +24,8 @@ else
|
|||||||
fi
|
fi
|
||||||
subject="${subject} ${URL} ${DATE}"
|
subject="${subject} ${URL} ${DATE}"
|
||||||
echo > ${BACKUPDIR}/${LOGFILE}
|
echo > ${BACKUPDIR}/${LOGFILE}
|
||||||
${PYTHON} ${WEBSCRAP} --url ${URL} --dir ${DIRECTORY} --quiet --logfile ${BACKUPDIR}/${LOGFILE}
|
${PYTHON} ${WEBSCRAP} --quiet --logfile ${BACKUPDIR}/${LOGFILE} --parallel 20 export --url ${URL} --directory ${DIRECTORY}
|
||||||
if [ ${?} -ne 0 ]; then
|
if [ ${?} -ne 0 ]; then
|
||||||
subject="${subject} echoue : recuperation page"
|
subject="${subject} echoue : recuperation page"
|
||||||
echo ${subject} | mail -s "${subject}" -A ${BACKUPDIR}/${LOGFILE} ${SENDER}
|
echo ${subject} | mail -s "${subject}" -A ${BACKUPDIR}/${LOGFILE} ${SENDER}
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user