diff --git a/home/homelab/idle-process.md b/home/homelab/idle-process.md index bf21f7b..812c018 100644 --- a/home/homelab/idle-process.md +++ b/home/homelab/idle-process.md @@ -2,7 +2,7 @@ title: Create a Background Idle Prevention Processs description: published: true -date: 2025-06-25T11:49:23.320Z +date: 2025-06-25T13:43:53.845Z tags: editor: markdown dateCreated: 2025-06-25T11:49:23.320Z @@ -52,16 +52,19 @@ To ensure the script runs automatically on boot and is managed by the system, co ``` Add the following content: ```ini - [Unit] - Description=Keep Alive Script to Prevent Idle - After=network.target + [Unit] + Description=Keep Alive Script to Prevent Idle + After=network.target - [Service] - ExecStart=/usr/local/bin/keep_alive.sh - Restart=always + [Service] + Type=simple + ExecStart=/bin/bash /usr/local/bin/keep_alive.sh + Restart=always + StandardOutput=null + StandardError=null - [Install] - WantedBy=multi-user.target + [Install] + WantedBy=multi-user.target ``` Save and exit (`Ctrl+O`, `Enter`, `Ctrl+X`). @@ -81,4 +84,5 @@ To ensure the script runs automatically on boot and is managed by the system, co ## Notes - **Resource Usage**: The script uses near 0% CPU and minimal memory (a few KB). - **Interval Adjustment**: Modify the `sleep 60` value in the script to change the interval (e.g., `sleep 30` for 30 seconds). -- **Monitoring**: Confirm the script is running with `ps aux | grep keep_alive`. \ No newline at end of file +- **Monitoring**: Confirm the script is running with `ps aux | grep keep_alive`. +