38 lines
978 B
Bash
38 lines
978 B
Bash
|
echo "-------------------------------------------------"
|
||
|
echo -e "--------------- ${BLUE}CHECK IP ADMIN${NC} ------------------"
|
||
|
echo -e "-------------------------------------------------\n"
|
||
|
|
||
|
# 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
|