Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 27 lines (20 sloc) 0.549 kB
#!/bin/bash
. /etc/webc/webc.conf
server="http://ping.webconverger.org/"
sleeping=5
device=$( df 2>/dev/null | grep /live/image | awk '{ print $1 }' )
test "$device" = "" && device="hd-install"
webcping () {
logger "Pinging $server"
wget -qO- --timeout=5 --post-data="M=$(
mac_address | md5sum | awk '{print $1}'
)&V=${webc_version}&D=${device}" "$server"
}
lockdir=/var/run/webcping
test -f "$lockdir" && exit 0
touch "$lockdir"
while ! webcping
do
logger "Failed to ping $server, sleeping $sleeping seconds"
sleep "$sleeping"
done &
Jump to Line
Something went wrong with that request. Please try again.