From 2f8b01b76823abc24e955f49284d23e45462d639 Mon Sep 17 00:00:00 2001 From: Jali Date: Sun, 21 Sep 2025 00:24:04 +0200 Subject: [PATCH] Change the delimiter in the repository file from ":" to "|" Done in order to prevent problems with the ":" in URIs --- services/git-monitor | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/git-monitor b/services/git-monitor index 71dc169..7b37016 100755 --- a/services/git-monitor +++ b/services/git-monitor @@ -7,6 +7,7 @@ BRANCH_NAME="develop" POLL_INTERVAL=60 # Seconds between checks #LOG_FILE="/var/log/git-monitor.log" # Log file for recording actions LOCK_FILE="/tmp/git-monitor.lock" # File to prevent multiple instances running concurrently +IFS="|" # Functions log_message() { @@ -38,7 +39,7 @@ run_after() { } initialize_repos() { - while IFS=: read -r REPO_NAME REPO_URL; do + while read -r REPO_NAME REPO_URL; do if [ ! -d "$REPO_LOCAL_PATH/$REPO_NAME" ]; then log_message "INFO" "Repository directory does not exist. Cloning..." mkdir -p "$REPO_LOCAL_PATH" @@ -90,7 +91,7 @@ log_message "INFO" "Git monitor started." initialize_repo while true; do - while IFS=: read -r $REPO_NAME $REPO_URL; do + while read -r $REPO_NAME $REPO_URL; do check_for_updates $REPO_NAME run_after "$REPO_LOCAL_PATH/$REPO_NAME/.git-monitor_after.sh" done < $REPO_URLS