diff --git a/maven-meeper/src/bin/crontab.txt b/maven-meeper/src/bin/crontab.txt index ed9890973..f07de1c4a 100644 --- a/maven-meeper/src/bin/crontab.txt +++ b/maven-meeper/src/bin/crontab.txt @@ -1 +1 @@ -0 */4 * * * cd ~/components/maven-meeper/src/bin; ./synchronize.sh 2>&1 | tee $HOME/repository-staging/to-ibiblio/reports/sync/last-sync-results.txt +0 */4 * * * cd ~/components/maven-meeper/src/bin; ./synchronize.sh diff --git a/maven-meeper/src/bin/synchronize.sh b/maven-meeper/src/bin/synchronize.sh index bc2011c3b..69776b564 100755 --- a/maven-meeper/src/bin/synchronize.sh +++ b/maven-meeper/src/bin/synchronize.sh @@ -13,8 +13,10 @@ dir=`pwd` syncProperties=$dir/synchronize.properties MODE=$1 - PID=$$ + +( + RUNNING=`ps -ef | grep synchronize.sh | grep -v 'sh -c' | grep -v grep | grep -v $PID` if [ ! -z "$RUNNING" ]; then echo Sync already running... exiting @@ -116,3 +118,5 @@ echo "Copying rewrite rules into place" cp $M1_M2_REWRITE_RULES $MAVEN1_REPO/.htaccess scp $M1_M2_REWRITE_RULES maven@login.ibiblio.org:/public/html/maven/.htaccess + +) > $HOME/repository-staging/to-ibiblio/reports/sync/last-sync-results.txt 2>&1