From 4a43f21d427af765de4ed798c75029508e4431ea Mon Sep 17 00:00:00 2001 From: Ronaldo Dias Date: Sun, 7 Jun 2026 03:14:23 -0300 Subject: [PATCH] =?UTF-8?q?Renomeia=20refer=C3=AAncias=20de=20health-monit?= =?UTF-8?q?or=20para=20health-check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- healthcheck.py | 4 ++-- install_systemd.fish | 10 +++++----- install_systemd.sh | 10 +++++----- setup.fish | 4 ++-- setup.sh | 4 ++-- .../{health-monitor.service => health-check.service} | 6 +++--- systemd/{health-monitor.timer => health-check.timer} | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) rename systemd/{health-monitor.service => health-check.service} (52%) rename systemd/{health-monitor.timer => health-check.timer} (61%) diff --git a/healthcheck.py b/healthcheck.py index e1b9f59..3d2f9e4 100644 --- a/healthcheck.py +++ b/healthcheck.py @@ -11,7 +11,7 @@ PAYLOAD = json.dumps({"name": "Ronaldo Freitas Dias"}).encode() def load_url_from_config(): - config_file = Path.home() / ".config" / "health-monitor" + config_file = Path.home() / ".config" / "health-check" if config_file.exists(): for line in config_file.read_text().splitlines(): if line.startswith("HEALTHCHECK_URL="): @@ -19,7 +19,7 @@ def load_url_from_config(): return None -HEADERS = {"User-Agent": "health-monitor/1.0", "Content-Type": "application/json"} +HEADERS = {"User-Agent": "health-check/1.0", "Content-Type": "application/json"} def ping(url: str, timeout: int) -> int: diff --git a/install_systemd.fish b/install_systemd.fish index e8771cf..3d035b6 100644 --- a/install_systemd.fish +++ b/install_systemd.fish @@ -1,17 +1,17 @@ #!/usr/bin/env fish set SCRIPT_DIR (dirname (realpath (status filename))) -set CONFIG_FILE "$HOME/.config/health-monitor" +set CONFIG_FILE "$HOME/.config/health-check" mkdir -p "$HOME/.config/systemd/user" -cp "$SCRIPT_DIR/systemd/health-monitor.service" "$HOME/.config/systemd/user/" -cp "$SCRIPT_DIR/systemd/health-monitor.timer" "$HOME/.config/systemd/user/" +cp "$SCRIPT_DIR/systemd/health-check.service" "$HOME/.config/systemd/user/" +cp "$SCRIPT_DIR/systemd/health-check.timer" "$HOME/.config/systemd/user/" echo "Arquivos de unit systemd copiados para ~/.config/systemd/user/." systemctl --user daemon-reload -systemctl --user enable --now health-monitor.timer -systemctl --user status --no-pager health-monitor.timer +systemctl --user enable --now health-check.timer +systemctl --user status --no-pager health-check.timer # Ping de teste imediato para confirmar que tudo funciona echo "" diff --git a/install_systemd.sh b/install_systemd.sh index 2e05c2c..5c518ba 100644 --- a/install_systemd.sh +++ b/install_systemd.sh @@ -2,17 +2,17 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -CONFIG_FILE="${HOME}/.config/health-monitor" +CONFIG_FILE="${HOME}/.config/health-check" mkdir -p "${HOME}/.config/systemd/user" -cp "${SCRIPT_DIR}/systemd/health-monitor.service" "${HOME}/.config/systemd/user/" -cp "${SCRIPT_DIR}/systemd/health-monitor.timer" "${HOME}/.config/systemd/user/" +cp "${SCRIPT_DIR}/systemd/health-check.service" "${HOME}/.config/systemd/user/" +cp "${SCRIPT_DIR}/systemd/health-check.timer" "${HOME}/.config/systemd/user/" echo "Arquivos de unit systemd copiados para ~/.config/systemd/user/." systemctl --user daemon-reload -systemctl --user enable --now health-monitor.timer -systemctl --user status --no-pager health-monitor.timer +systemctl --user enable --now health-check.timer +systemctl --user status --no-pager health-check.timer # Ping de teste imediato para confirmar que tudo funciona echo "" diff --git a/setup.fish b/setup.fish index e073b5a..43935a2 100644 --- a/setup.fish +++ b/setup.fish @@ -1,8 +1,8 @@ #!/usr/bin/env fish set REPO_URL "https://github.com/SantosFC/health-check.git" -set INSTALL_DIR "$HOME/src/health-monitor" -set CONFIG_FILE "$HOME/.config/health-monitor" +set INSTALL_DIR "$HOME/src/health-check" +set CONFIG_FILE "$HOME/.config/health-check" # 1. Verificar pré-requisitos for cmd in git python3 systemctl loginctl diff --git a/setup.sh b/setup.sh index f7632cc..8e82895 100644 --- a/setup.sh +++ b/setup.sh @@ -2,8 +2,8 @@ set -euo pipefail REPO_URL="https://github.com/SantosFC/health-check.git" -INSTALL_DIR="${HOME}/src/health-monitor" -CONFIG_FILE="${HOME}/.config/health-monitor" +INSTALL_DIR="${HOME}/src/health-check" +CONFIG_FILE="${HOME}/.config/health-check" # 1. Verificar pré-requisitos for cmd in git python3 systemctl loginctl; do diff --git a/systemd/health-monitor.service b/systemd/health-check.service similarity index 52% rename from systemd/health-monitor.service rename to systemd/health-check.service index a5ac98d..71a5cf5 100644 --- a/systemd/health-monitor.service +++ b/systemd/health-check.service @@ -1,12 +1,12 @@ [Unit] -Description=Health Monitor check script +Description=Health check script Wants=network-online.target After=network-online.target [Service] Type=oneshot -EnvironmentFile=-%h/.config/health-monitor -ExecStart=/usr/bin/env python3 %h/src/health-monitor/healthcheck.py +EnvironmentFile=-%h/.config/health-check +ExecStart=/usr/bin/env python3 %h/src/health-check/healthcheck.py StandardOutput=journal StandardError=journal diff --git a/systemd/health-monitor.timer b/systemd/health-check.timer similarity index 61% rename from systemd/health-monitor.timer rename to systemd/health-check.timer index f48a57d..70cd016 100644 --- a/systemd/health-monitor.timer +++ b/systemd/health-check.timer @@ -1,5 +1,5 @@ [Unit] -Description=Run Health Monitor check every 2 minutes +Description=Run health check every 2 minutes [Timer] OnCalendar=*:0/2