Renomeia referências de health-monitor para health-check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ronaldo Dias 2026-06-07 03:14:23 -03:00
parent 30e0322907
commit 4a43f21d42
7 changed files with 20 additions and 20 deletions

View file

@ -11,7 +11,7 @@ PAYLOAD = json.dumps({"name": "Ronaldo Freitas Dias"}).encode()
def load_url_from_config(): def load_url_from_config():
config_file = Path.home() / ".config" / "health-monitor" config_file = Path.home() / ".config" / "health-check"
if config_file.exists(): if config_file.exists():
for line in config_file.read_text().splitlines(): for line in config_file.read_text().splitlines():
if line.startswith("HEALTHCHECK_URL="): if line.startswith("HEALTHCHECK_URL="):
@ -19,7 +19,7 @@ def load_url_from_config():
return None 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: def ping(url: str, timeout: int) -> int:

View file

@ -1,17 +1,17 @@
#!/usr/bin/env fish #!/usr/bin/env fish
set SCRIPT_DIR (dirname (realpath (status filename))) 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" mkdir -p "$HOME/.config/systemd/user"
cp "$SCRIPT_DIR/systemd/health-monitor.service" "$HOME/.config/systemd/user/" cp "$SCRIPT_DIR/systemd/health-check.service" "$HOME/.config/systemd/user/"
cp "$SCRIPT_DIR/systemd/health-monitor.timer" "$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/." echo "Arquivos de unit systemd copiados para ~/.config/systemd/user/."
systemctl --user daemon-reload systemctl --user daemon-reload
systemctl --user enable --now health-monitor.timer systemctl --user enable --now health-check.timer
systemctl --user status --no-pager health-monitor.timer systemctl --user status --no-pager health-check.timer
# Ping de teste imediato para confirmar que tudo funciona # Ping de teste imediato para confirmar que tudo funciona
echo "" echo ""

View file

@ -2,17 +2,17 @@
set -euo pipefail set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 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" mkdir -p "${HOME}/.config/systemd/user"
cp "${SCRIPT_DIR}/systemd/health-monitor.service" "${HOME}/.config/systemd/user/" cp "${SCRIPT_DIR}/systemd/health-check.service" "${HOME}/.config/systemd/user/"
cp "${SCRIPT_DIR}/systemd/health-monitor.timer" "${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/." echo "Arquivos de unit systemd copiados para ~/.config/systemd/user/."
systemctl --user daemon-reload systemctl --user daemon-reload
systemctl --user enable --now health-monitor.timer systemctl --user enable --now health-check.timer
systemctl --user status --no-pager health-monitor.timer systemctl --user status --no-pager health-check.timer
# Ping de teste imediato para confirmar que tudo funciona # Ping de teste imediato para confirmar que tudo funciona
echo "" echo ""

View file

@ -1,8 +1,8 @@
#!/usr/bin/env fish #!/usr/bin/env fish
set REPO_URL "https://github.com/SantosFC/health-check.git" set REPO_URL "https://github.com/SantosFC/health-check.git"
set INSTALL_DIR "$HOME/src/health-monitor" set INSTALL_DIR "$HOME/src/health-check"
set CONFIG_FILE "$HOME/.config/health-monitor" set CONFIG_FILE "$HOME/.config/health-check"
# 1. Verificar pré-requisitos # 1. Verificar pré-requisitos
for cmd in git python3 systemctl loginctl for cmd in git python3 systemctl loginctl

View file

@ -2,8 +2,8 @@
set -euo pipefail set -euo pipefail
REPO_URL="https://github.com/SantosFC/health-check.git" REPO_URL="https://github.com/SantosFC/health-check.git"
INSTALL_DIR="${HOME}/src/health-monitor" INSTALL_DIR="${HOME}/src/health-check"
CONFIG_FILE="${HOME}/.config/health-monitor" CONFIG_FILE="${HOME}/.config/health-check"
# 1. Verificar pré-requisitos # 1. Verificar pré-requisitos
for cmd in git python3 systemctl loginctl; do for cmd in git python3 systemctl loginctl; do

View file

@ -1,12 +1,12 @@
[Unit] [Unit]
Description=Health Monitor check script Description=Health check script
Wants=network-online.target Wants=network-online.target
After=network-online.target After=network-online.target
[Service] [Service]
Type=oneshot Type=oneshot
EnvironmentFile=-%h/.config/health-monitor EnvironmentFile=-%h/.config/health-check
ExecStart=/usr/bin/env python3 %h/src/health-monitor/healthcheck.py ExecStart=/usr/bin/env python3 %h/src/health-check/healthcheck.py
StandardOutput=journal StandardOutput=journal
StandardError=journal StandardError=journal

View file

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Run Health Monitor check every 2 minutes Description=Run health check every 2 minutes
[Timer] [Timer]
OnCalendar=*:0/2 OnCalendar=*:0/2