diff options
-rw-r--r-- | lume-watcher | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lume-watcher b/lume-watcher index e1d9b8d..3d299c0 100644 --- a/lume-watcher +++ b/lume-watcher @@ -52,9 +52,12 @@ monitor_directory() { if [ $((now - last_run_time)) -ge $COOLDOWN_TIME ]; then echo "$(date): Executing command" >> "$LOG_FILE" + + sleep 10 cd /var/www/html/soulmining || exit $COMMAND >> "$LOG_FILE" 2>&1 cd ~ || exit + set_last_run_time else echo "$(date): Command not executed due to cooldown" >> "$LOG_FILE" @@ -82,6 +85,7 @@ stop() { status() { if [ -f "$PID_FILE" ]; then + cat "$PID_FILE" echo "Service is running." else echo "Service is stopped." @@ -103,7 +107,7 @@ case "$1" in start ;; *) - echo "Usage: /etc/init.d/lume-watcher {start|stop|status|restart}" + echo "Usage: lume-watcher {start|stop|status|restart}" exit 1 ;; esac |