Minor changes, fix notify if container not started

This commit is contained in:
Jose
2019-12-27 14:48:06 -04:00
parent 9421cc59a0
commit f3615a3380

View File

@@ -55,15 +55,15 @@ if [ "${TARGET}" = 'ALL' ]; then
fi
if [ "${TARGET}" != 'ALL' ]; then
JAILS=$(jls name | awk "/^${TARGET}$/")
## test if not running
if [ ! "$(jls name | awk "/^${TARGET}$/")" ]; then
echo -e "${COLOR_RED}[${TARGET}]: Not started.${COLOR_RESET}"
fi
fi
for _jail in ${JAILS}; do
## test if not running
if [ ! "$(jls name | awk "/^${_jail}$/")" ]; then
echo -e "${COLOR_RED}[${_jail}]: Not started.${COLOR_RESET}"
## test if running
elif [ "$(jls name | awk "/^${_jail}$/")" ]; then
if [ "$(jls name | awk "/^${_jail}$/")" ]; then
## remove ip4.addr from firewall table:jails
if [ ! -z "${bastille_jail_loopback}" ]; then
pfctl -q -t jails -T delete $(jls -j ${_jail} ip4.addr)