diff --git a/cd.sh b/cd.sh index bf6f3ee..ac3d8b7 100644 --- a/cd.sh +++ b/cd.sh @@ -5,7 +5,7 @@ cd ./../home/ubuntu/RMUD2 git fetch pid=$(sudo lsof -t -i:2001) echo "Existing process: $pid" -if [[ "$(git rev-parse $BRANCH)" != "$(git rev-parse "$REMOTE/$BRANCH")" ]] || [["$pid" == ""]]; then +if [[ "$(git rev-parse $BRANCH)" != "$(git rev-parse "$REMOTE/$BRANCH")" ]] || [ -z "$pid"]; then rm -rf ./cd.log echo "Deploying new changes at $(date): $(git log -1 --pretty=%B)" bash start.sh &