diff --git a/scripts/unison_backup.sh b/scripts/unison_backup.sh new file mode 100755 index 0000000..1af3714 --- /dev/null +++ b/scripts/unison_backup.sh @@ -0,0 +1,11 @@ +unison_exe="/usr/bin/unison" +tmp_file=$(mktemp) +res=$(${unison_exe} -batch > ${tmp_file} 2>&1) +grep "Nothing to do: replicas have not changed since last sync" ${tmp_file} > /dev/null +file_sync=$? + +if [ ! $file_sync == 0 ]; +then + echo $(more ${tmp_file}) +fi +