Additional network config checks
This commit is contained in:
1 parent
e4c4d0df2e
commit
03597e1489
1 file changed
+7
-3
@@ -71,17 +71,21 @@ validate_netif() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
validate_netconf() {
|
validate_netconf() {
|
||||||
|
if [ -n "${bastille_jail_loopback}" ] && [ -n "${bastille_jail_interface}" ] && [ -n "${bastille_jail_external}" ]; then
|
||||||
|
echo -e "${COLOR_RED}Invalid network configuration.${COLOR_RESET}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if [ ! -z "${bastille_jail_external}" ]; then
|
if [ ! -z "${bastille_jail_external}" ]; then
|
||||||
break
|
break
|
||||||
elif [ ! -z ${bastille_jail_loopback} ] && [ -z ${bastille_jail_external} ]; then
|
elif [ ! -z "${bastille_jail_loopback}" ] && [ -z "${bastille_jail_external}" ]; then
|
||||||
if [ -z "${bastille_jail_interface}" ]; then
|
if [ -z "${bastille_jail_interface}" ]; then
|
||||||
echo -e "${COLOR_RED}Invalid network configuration.${COLOR_RESET}"
|
echo -e "${COLOR_RED}Invalid network configuration.${COLOR_RESET}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [ -z ${bastille_jail_loopback} ] && [ ! -z ${bastille_jail_interface} ]; then
|
elif [ -z "${bastille_jail_loopback}" ] && [ ! -z "${bastille_jail_interface}" ]; then
|
||||||
echo -e "${COLOR_RED}Invalid network configuration.${COLOR_RESET}"
|
echo -e "${COLOR_RED}Invalid network configuration.${COLOR_RESET}"
|
||||||
exit 1
|
exit 1
|
||||||
elif [ -z ${bastille_jail_external} ]; then
|
elif [ -z "${bastille_jail_external}" ]; then
|
||||||
echo -e "${COLOR_RED}Invalid network configuration.${COLOR_RESET}"
|
echo -e "${COLOR_RED}Invalid network configuration.${COLOR_RESET}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user