mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-23 18:50:46 +01:00
Ignore IPv4 check if there is no entry at all
This commit is contained in:
@@ -68,11 +68,13 @@ for _jail in ${JAILS}; do
|
|||||||
|
|
||||||
## test if not running
|
## test if not running
|
||||||
elif [ ! "$(jls name | awk "/^${_jail}$/")" ]; then
|
elif [ ! "$(jls name | awk "/^${_jail}$/")" ]; then
|
||||||
## warn if matching configured (but not online) ip4.addr
|
## warn if matching configured (but not online) ip4.addr, ignore if there's no ip4.addr entry
|
||||||
ip=$(grep 'ip4.addr' "${bastille_jailsdir}/${_jail}/jail.conf" | awk '{print $3}' | sed 's/\;//g')
|
ip=$(grep 'ip4.addr' "${bastille_jailsdir}/${_jail}/jail.conf" | awk '{print $3}' | sed 's/\;//g')
|
||||||
if ifconfig | grep -w "${ip}" >/dev/null; then
|
if [ -n "${ip}" ]; then
|
||||||
echo -e "${COLOR_RED}Error: IP address (${ip}) already in use.${COLOR_RESET}"
|
if ifconfig | grep -w "${ip}" >/dev/null; then
|
||||||
exit 1
|
echo -e "${COLOR_RED}Error: IP address (${ip}) already in use.${COLOR_RESET}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## start the container
|
## start the container
|
||||||
|
|||||||
Reference in New Issue
Block a user