From: mwolson_admin Date: Tue, 18 Dec 2007 21:31:42 +0000 (-0500) Subject: apache-sync-logs: Skip people who have unreadable log subdirectories. X-Git-Url: https://git.hcoop.net/hcoop/scripts.git/commitdiff_plain/ba4e6c35f00132eb2bef16670cc204c61a8bf7b3 apache-sync-logs: Skip people who have unreadable log subdirectories. --- diff --git a/apache-sync-logs b/apache-sync-logs index fdc2919..b3d1ab2 100755 --- a/apache-sync-logs +++ b/apache-sync-logs @@ -24,8 +24,9 @@ chmod -R u=rwX,g=rX,o=X $LOCAL_LOG_DIR for A in $(find $LOCAL_LOG_DIR -mindepth 3 -maxdepth 3 -print); do USER=`basename $A` PATHBITS=`echo $USER | head -c 1`/`echo $USER | head -c 2`/$USER + USER_HOME=$AFS_USER_DIR/$PATHBITS LOG_SRC=$A/apache/log - LOG_DEST=$AFS_USER_DIR/$PATHBITS/.logs/apache/ + LOG_DEST=$USER_HOME/.logs/apache/ TMP_DEST=$LOG_SRC.tmp # Skip deleted or empty log directories @@ -33,6 +34,12 @@ for A in $(find $LOCAL_LOG_DIR -mindepth 3 -maxdepth 3 -print); do continue fi + # Skip people who have unreadable log subdirectories + if test -d "$USER_HOME/.logs" && \ + ! ls "$USER_HOME/.logs" >/dev/null 2>&1; then + continue + fi + # Skip people who do not have keytabs if test ! -f "$KEYTAB_DIR/$USER"; then continue