comment now in the right place
This commit is contained in:
parent
8f93b40c0e
commit
989030ef43
1 changed files with 1 additions and 1 deletions
|
|
@ -16,10 +16,10 @@ if [ ! -f $BKP_FILE ]; then
|
||||||
curl -s https://$DEL_USER:$DEL_PASS@$API_URL > $BKP_FILE
|
curl -s https://$DEL_USER:$DEL_PASS@$API_URL > $BKP_FILE
|
||||||
else
|
else
|
||||||
curl -s https://$DEL_USER:$DEL_PASS@$API_URL > $BKP_FILE.tmp
|
curl -s https://$DEL_USER:$DEL_PASS@$API_URL > $BKP_FILE.tmp
|
||||||
# if XML is valid, move to final destination
|
|
||||||
if [ $(xmlstarlet validate $BKP_FILE.tmp > /dev/null 2>&1; echo $?) -gt 0 ]; then
|
if [ $(xmlstarlet validate $BKP_FILE.tmp > /dev/null 2>&1; echo $?) -gt 0 ]; then
|
||||||
rm $BKP_FILE.tmp
|
rm $BKP_FILE.tmp
|
||||||
echo "Downloaded XML file not valid. Previous backup preserved."
|
echo "Downloaded XML file not valid. Previous backup preserved."
|
||||||
|
# if XML is valid, move to final destination
|
||||||
else
|
else
|
||||||
mv $BKP_FILE.tmp $BKP_FILE
|
mv $BKP_FILE.tmp $BKP_FILE
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue