X-Git-Url: https://git.hcoop.net/hcoop/scripts.git/blobdiff_plain/e16ccb3a3556890425230ef0eb2d398acb8694f0..b7f2a6bb672f16862e7612946eab9c307b5cb8c0:/apache-sync-logs?ds=sidebyside diff --git a/apache-sync-logs b/apache-sync-logs index 4c38de6..aec4e67 100755 --- a/apache-sync-logs +++ b/apache-sync-logs @@ -9,7 +9,9 @@ kdestroy > /dev/null 2>&1 unlog #VERBOSE=true -VERBOSE=false +if [ -z "$VERBOSE" ]; then + VERBOSE=false +fi LOCAL_LOG_DIR=/var/log/apache2/user KEYTAB_DIR=/etc/keytabs/user.daemon @@ -69,7 +71,8 @@ for A in $(find $LOCAL_LOG_DIR -mindepth 3 -maxdepth 3 -print); do fi continue else - k5start -qtU -f $KEYTAB_DIR/$USER -- rsync -a -v --no-owner --no-group --delete $LOG_SRC/ $LOG_DEST/ + # LOG_SRC/* is important: don't remove log files just because a vhost is gone + k5start -qtU -f $KEYTAB_DIR/$USER -- rsync -a --no-owner --no-group --delete $LOG_SRC/* $LOG_DEST/ test "$VERBOSE" = "true" && echo " done." fi done