Skip to content

Instantly share code, notes, and snippets.

@GamePlayer-8
Created June 3, 2025 12:06
Show Gist options
  • Save GamePlayer-8/60eca6137851383be3836d94f22df244 to your computer and use it in GitHub Desktop.
Save GamePlayer-8/60eca6137851383be3836d94f22df244 to your computer and use it in GitHub Desktop.
Systemd Network Healthcheck.
[Unit]
Description=Check if IP address became online
After=network.target
[Service]
Type=simple
ExecStart=/bin/sh -c 'until ping -c 1 %i; do sleep 1; done'
Restart=on-failure
RestartSec=1
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment