X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=handlers%2Fldap.in;h=fda24d08878304f044821d08c5608cfde171402f;hp=0b0166ecc4eff999993e07cb4b76372a80834afa;hb=47313bca65de105145f2168538b294a9bcc0e98d;hpb=4ecaae94054c4eb919ddbd45904d834383a09558 diff --git a/handlers/ldap.in b/handlers/ldap.in index 0b0166e..fda24d0 100644 --- a/handlers/ldap.in +++ b/handlers/ldap.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # openldap backup handler script for backupninja # @@ -85,12 +86,12 @@ if [ "$ldif" == "yes" ]; then fi if [ "$compress" == "yes" ]; then - execstr="$execstr | $GZIP > $dumpdir/$dbsuffix.ldif.gz" + execstr="$execstr | $GZIP --rsyncable > $dumpdir/$dbsuffix.ldif.gz" else execstr="$execstr > $dumpdir/$dbsuffix.ldif" fi debug "$execstr" - output=`su root -c "$execstr" 2>&1` + output=`su root -c "set -o pipefail ; $execstr" 2>&1` code=$? if [ "$code" == "0" ]; then debug $output