summary refs log tree commit diff
path: root/bin/wait-online
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wait-online')
-rwxr-xr-xbin/wait-online10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/wait-online b/bin/wait-online
new file mode 100755
index 0000000..7ad52e1
--- /dev/null
+++ b/bin/wait-online
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+trap '{ exit 0; }' INT
+
+while true; do
+	ping -c3 "${1:-gentoo.org}" &&
+		env BEEP_MSG="online again" beep &&
+		break
+	sleep 1
+done