Change the delimiter in the repository file from ":" to "|"

Done in order to prevent problems with the ":" in URIs
This commit is contained in:
2025-09-21 00:24:04 +02:00
parent 0d635a0095
commit 2f8b01b768

View File

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