Skip to content
executable file 25 lines (19 sloc) 348 Bytes
#!/bin/bash
flag="/var/run/after-network-up"
[[ -e $flag ]] && exit 0
touch $flag
_exit() {
rm -f $flag
}
trap _exit EXIT
wait_until_network() {
while ! ip route | grep -qs default; do
sleep 0.25
done
return 0
}
. "/etc/webc/functions.sh"
. "/etc/webc/webc.conf"
for i in /etc/webc/network-up.d/*; do
( wait_until_network && $i) &
done
Something went wrong with that request. Please try again.