From 09cdd8284787f8171a44754e3afaa9be9e910047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=93=99=F0=9D=93=BE=F0=9D=93=B5=F0=9D=93=B2?= =?UTF-8?q?=F0=9D=93=B8?= Date: Mon, 27 Jan 2025 01:08:30 +0100 Subject: [PATCH] Update inotify/opt/nginx_change_monitor.sh --- inotify/opt/nginx_change_monitor.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/inotify/opt/nginx_change_monitor.sh b/inotify/opt/nginx_change_monitor.sh index d8782e8..f241c95 100644 --- a/inotify/opt/nginx_change_monitor.sh +++ b/inotify/opt/nginx_change_monitor.sh @@ -1,12 +1,9 @@ #!/bin/bash -# Directory to monitor TARGET_DIR="/etc/nginx/live/" -# Log file for tracking changes LOG_FILE="/var/log/nginx_change_monitor.log" -# Function to check Nginx configuration and reload if valid reload_nginx_if_valid() { echo "Checking Nginx configuration..." | tee -a "$LOG_FILE" if nginx -t &>> "$LOG_FILE"; then @@ -17,7 +14,6 @@ reload_nginx_if_valid() { fi } -# Monitor the directory for changes using inotifywait echo "Starting Nginx change monitor for directory: $TARGET_DIR" | tee -a "$LOG_FILE" inotifywait -m -r -e modify,create,delete --format '%w%f %e' "$TARGET_DIR" | while read FILE EVENT do