Added ip detection to the scripts.

Signed-off-by: Mark Wolfe <mark@wolfe.id.au>