#!/bin/bash
#
# (c) Lorenzo Canovi (KUBiC Labs, CH) <packager@kubiclabs.com>
# for copyright see /usr/share/doc/ku-base/copyright
#
CMD=$(basename $0)

[ -f /etc/default/ku-base ] && . /etc/default/ku-base

KU_WANIPX_URL=${KU_WANIP_URL:-"http://www.kubiclabs.com/bin/myipx.pl"}

wanip=$(wget -q -O - $KU_WANIPX_URL) || {
	echo "can't contact server" >&2
	exit 1
}
echo "$wanip"
exit 0
