Created
November 12, 2024 13:09
-
-
Save bsdayo/13911a954ab43b5c751873192727efd8 to your computer and use it in GitHub Desktop.
Systemd service to check Internet access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description = Check Internet access | |
After = network-online.target | |
[Service] | |
Type = oneshot | |
ExecStart = /bin/bash -c "until ping -c 1 www.baidu.com; do sleep 1; done;" | |
[Install] | |
WantedBy = network-online.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment