docs: update home/homelab/idle-process

This commit is contained in:
cheeks 2025-06-25 13:43:55 +00:00 committed by cheeks
parent 0af048760a
commit ef82e1e1b6

View File

@ -2,7 +2,7 @@
title: Create a Background Idle Prevention Processs title: Create a Background Idle Prevention Processs
description: description:
published: true published: true
date: 2025-06-25T11:49:23.320Z date: 2025-06-25T13:43:53.845Z
tags: tags:
editor: markdown editor: markdown
dateCreated: 2025-06-25T11:49:23.320Z 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: Add the following content:
```ini ```ini
[Unit] [Unit]
Description=Keep Alive Script to Prevent Idle Description=Keep Alive Script to Prevent Idle
After=network.target After=network.target
[Service] [Service]
ExecStart=/usr/local/bin/keep_alive.sh Type=simple
Restart=always ExecStart=/bin/bash /usr/local/bin/keep_alive.sh
Restart=always
StandardOutput=null
StandardError=null
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
``` ```
Save and exit (`Ctrl+O`, `Enter`, `Ctrl+X`). Save and exit (`Ctrl+O`, `Enter`, `Ctrl+X`).
@ -82,3 +85,4 @@ To ensure the script runs automatically on boot and is managed by the system, co
- **Resource Usage**: The script uses near 0% CPU and minimal memory (a few KB). - **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). - **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`. - **Monitoring**: Confirm the script is running with `ps aux | grep keep_alive`.