2019-05-01 17:14:28 +02:00
|
|
|
print_config_title 'CHECK IP ADMIN'
|
2019-03-24 15:56:17 +01:00
|
|
|
|
|
|
|
# Check if ADMIN IPs are configured
|
|
|
|
|
|
|
|
# IPv6
|
|
|
|
echo ${LOCALES_IP_WITHOUT_LOOPBACK} | grep -q "^${IPV6_ADMIN_NETWORK}\| ${IPV6_ADMIN_NETWORK}"
|
|
|
|
|
|
|
|
# Return Code
|
|
|
|
RC=$?
|
|
|
|
|
|
|
|
# IPv6 Admin not configured
|
|
|
|
if [ $RC -ne 0 ]
|
|
|
|
then
|
|
|
|
BOOL_ADMIN_IPV6_NOT_CONFIGURED=1
|
|
|
|
echo -e "${RED}IPv6 Admin NOT CONFIGURED : check KO${NC}\n"
|
|
|
|
# IPv6 Admin configured
|
|
|
|
else
|
|
|
|
echo -e "${GREEN}IPv6 Admin CONFIGURED : check OK${NC}\n"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# IPv4
|
|
|
|
echo ${LOCALES_IP_WITHOUT_LOOPBACK} | grep -q "^${IPV4_ADMIN_NETWORK}\| ${IPV4_ADMIN_NETWORK}"
|
|
|
|
|
|
|
|
# Return Code
|
|
|
|
RC=$?
|
|
|
|
|
|
|
|
# IPv4 Admin not configured
|
|
|
|
if [ $RC -ne 0 ]
|
|
|
|
then
|
|
|
|
BOOL_ADMIN_IPV4_NOT_CONFIGURED=1
|
|
|
|
echo -e "${RED}IPv4 Admin NOT CONFIGURED : check KO${NC}\n"
|
|
|
|
# IPv4 Admin configured
|
|
|
|
else
|
|
|
|
echo -e "${GREEN}IPv4 Admin CONFIGURED : check OK${NC}\n"
|
|
|
|
fi
|