Skip to content

Instantly share code, notes, and snippets.

@Bryan2333
Last active March 14, 2024 15:51
Show Gist options
  • Save Bryan2333/d952ef5c7f3bdd51f805c1f3b73a3a85 to your computer and use it in GitHub Desktop.
Save Bryan2333/d952ef5c7f3bdd51f805c1f3b73a3a85 to your computer and use it in GitHub Desktop.
Ping a server on the internet until it becomes reachable
[Unit]
Description=Ping a server on the internet until it becomes reachable
[Service]
Type=oneshot
ExecStart=/usr/bin/bash -c 'while ! ping -c1 223.5.5.5; do sleep 1; done'
TimeoutStartSec=900s
StandardOutput=null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment