Catch-up runs triggered shortly after boot by Persistent=true were failing with DNS resolution errors because NetworkManager had not yet finished bringing up the network. Add network-online.target ordering plus a DNS poll for api.github.com so the service starts once name resolution actually works.
10 lines
503 B
Desktop File
10 lines
503 B
Desktop File
[Unit]
|
|
Description=Check hosted services for updates
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
WorkingDirectory=%h/Projects/service-update-alerts
|
|
ExecStartPre=/bin/sh -c 'for i in $(seq 1 30); do getent hosts api.github.com >/dev/null 2>&1 && exit 0; sleep 2; done; exit 1'
|
|
ExecStart=%h/Projects/service-update-alerts/.venv/bin/python -m update_monitor --services %h/Projects/service-update-alerts/services --auto-update --classify-timeout 300 --script-timeout 300
|