Add the distribution variable and correct the checkIp function
Patch for Debian use