From 42e8afecd88220eadea5a868dc69da0520982f8f Mon Sep 17 00:00:00 2001 From: Alper Kanat Date: Thu, 6 Nov 2008 01:24:32 +0000 Subject: [PATCH] * sync: fixed the issue that occurs only when sync script is run by third parties such as crontab. --- sync | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sync b/sync index e02f8db..d2c1f3a 100755 --- a/sync +++ b/sync @@ -81,6 +81,9 @@ if [[ -f "$PLANET_DIR/$LOCK_FILE" ]]; then exit 1 else touch "$PLANET_DIR/$LOCK_FILE" + + cd "$PLANET_DIR" + if (( $VERBOSE == 0 )); then echo >> "$LOG_DIR/$LOG_FILE" 2>&1 echo "starting new sync ($(date +"%d.%m.%Y, %H:%M"))" >> "$LOG_DIR/$LOG_FILE" 2>&1