chore: Rename project to service-update-alerts
Update project metadata, docs, and systemd unit names to match the new service-update-alerts naming.
This commit is contained in:
parent
413766ed2b
commit
501a84e0a9
8 changed files with 19 additions and 19 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Backlog: check-for-updates
|
||||
# Backlog: service-update-alerts
|
||||
|
||||
## US-01 - Curated Webservice Dataset
|
||||
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -1,4 +1,4 @@
|
|||
# check-for-updates
|
||||
# service-update-alerts
|
||||
|
||||
Small Python script to compare running service versions against upstream releases.
|
||||
|
||||
|
|
@ -57,14 +57,14 @@ Copy the unit files and enable the timer:
|
|||
|
||||
```bash
|
||||
mkdir -p ~/.config/systemd/user
|
||||
cp systemd/check-for-updates.service ~/.config/systemd/user/
|
||||
cp systemd/check-for-updates.timer ~/.config/systemd/user/
|
||||
cp systemd/service-update-alerts.service ~/.config/systemd/user/
|
||||
cp systemd/service-update-alerts.timer ~/.config/systemd/user/
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now check-for-updates.timer
|
||||
systemctl --user enable --now service-update-alerts.timer
|
||||
```
|
||||
|
||||
View logs:
|
||||
|
||||
```bash
|
||||
journalctl --user -u check-for-updates.service
|
||||
journalctl --user -u service-update-alerts.service
|
||||
```
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ def send_matrix_message(message: str, timeout: float) -> None:
|
|||
fetch_response(
|
||||
url,
|
||||
timeout=timeout,
|
||||
user_agent="check-for-updates",
|
||||
user_agent="service-update-alerts",
|
||||
extra_headers=headers,
|
||||
data=payload,
|
||||
method="PUT",
|
||||
|
|
@ -556,7 +556,7 @@ def join_matrix_room(homeserver: str, room_id: str, token: str, timeout: float)
|
|||
fetch_response(
|
||||
url,
|
||||
timeout=timeout,
|
||||
user_agent="check-for-updates",
|
||||
user_agent="service-update-alerts",
|
||||
extra_headers=headers,
|
||||
data=b"{}",
|
||||
method="POST",
|
||||
|
|
@ -570,7 +570,7 @@ def send_uptime_kuma_ping(timeout: float) -> None:
|
|||
if not push_url:
|
||||
return
|
||||
try:
|
||||
fetch_response(push_url, timeout=timeout, user_agent="check-for-updates")
|
||||
fetch_response(push_url, timeout=timeout, user_agent="service-update-alerts")
|
||||
except Exception as exc:
|
||||
print(f"Uptime Kuma push failed: {exc}", file=sys.stderr)
|
||||
|
||||
|
|
@ -580,7 +580,7 @@ def main() -> int:
|
|||
parser.add_argument("--config", default="services.yaml", help="Path to services YAML")
|
||||
parser.add_argument("--all", action="store_true", help="Show all services")
|
||||
parser.add_argument("--timeout", type=float, default=10.0, help="HTTP timeout in seconds")
|
||||
parser.add_argument("--user-agent", default="check-for-updates/1.0", help="HTTP user agent")
|
||||
parser.add_argument("--user-agent", default="service-update-alerts/1.0", help="HTTP user agent")
|
||||
args = parser.parse_args()
|
||||
|
||||
load_dotenv()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ requires = ["setuptools>=68", "wheel"]
|
|||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "check-for-updates"
|
||||
name = "service-update-alerts"
|
||||
version = "0.1.0"
|
||||
description = "Check running service versions against upstream releases"
|
||||
requires-python = ">=3.10"
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
[Unit]
|
||||
Description=Check hosted services for updates
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
WorkingDirectory=%h/Projects/check-for-updates
|
||||
ExecStart=%h/Projects/check-for-updates/.venv/bin/python %h/Projects/check-for-updates/check_updates.py --config %h/Projects/check-for-updates/services.yaml
|
||||
7
systemd/service-update-alerts.service
Normal file
7
systemd/service-update-alerts.service
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=Check hosted services for updates
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
WorkingDirectory=%h/Projects/service-update-alerts
|
||||
ExecStart=%h/Projects/service-update-alerts/.venv/bin/python %h/Projects/service-update-alerts/check_updates.py --config %h/Projects/service-update-alerts/services.yaml
|
||||
|
|
@ -16,7 +16,7 @@ def test_live_service_versions():
|
|||
failures = []
|
||||
|
||||
for service in services.values():
|
||||
result = check_service(service, timeout=20, user_agent="check-for-updates-test")
|
||||
result = check_service(service, timeout=20, user_agent="service-update-alerts-test")
|
||||
if service.upstream_latest_version_url and not result["latest"]:
|
||||
failures.append(f"{service.name}: latest version missing ({result['latest_error']})")
|
||||
if service.current_version_url and not result["current"]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue