diff options
Diffstat (limited to 'lume-watcher')
-rw-r--r-- | lume-watcher | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lume-watcher b/lume-watcher index c5ce5c5..70f1d58 100644 --- a/lume-watcher +++ b/lume-watcher @@ -53,9 +53,13 @@ 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 cd $OUTPUT_ROOT_DIR || exit $COMMAND >> "$LOG_FILE" 2>&1 cd ~ || exit + set_last_run_time else echo "$(date): Command not executed due to cooldown" >> "$LOG_FILE" @@ -84,6 +88,7 @@ stop() { status() { if [ -f "$PID_FILE" ]; then + cat "$PID_FILE" echo "Service is running." else echo "Service is stopped." @@ -105,7 +110,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 |