o don't reference the log file in the crontab but place it in the script so that when you run it by hand the last run is always logged.

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@471571 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2006-11-05 23:35:03 +00:00
parent f482076260
commit 92077580d8
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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