Commit b9773857 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Rafael Monnerat

software/slaprunner: Simplify condition by reversing it.

parent a22d8485
......@@ -31,7 +31,7 @@ md5sum = 9db9957f452bda370cb2d5cc2e833e85
[template-runner-export-script]
filename = template/runner-export.sh.jinja2
md5sum = 86a429492dba25364f6ec2b318ba1f85
md5sum = 553e67eaca57bf8f375c7479d34f03ec
[instance-runner-export]
filename = instance-runner-export.cfg.in
......
......@@ -87,11 +87,10 @@ sha256sum $backup_directory_path | LC_ALL=C sort -k 66 > $tmp_backup_sum
cat {{ directory['backup'] }}/backup.signature | egrep "instance/slappart.*/srv/backup/" > $tmp_filtered_signature
# If the diff fails, then the notifier will restart this script
diff_status=0
diff $tmp_backup_sum $tmp_filtered_signature || diff_status=1
if [ $diff_status -ne 0 ]; then
echo "ERROR: Some backups are not consistents, exporter should be re-run."
echo "Let's sleep 10 minutes, to let the backup end..."
sleep 10m
exit 1
if diff "$tmp_backup_sum" "$tmp_filtered_signature"; then
exit 0
fi
echo "ERROR: Some backups are not consistent, exporter should be re-run."
echo "Let's sleep 10 minutes, to let the backup end..."
sleep 10m
exit 1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment