Add double quotes to prevent globbing/word splitting, general code consistency improvements

This commit is contained in:
Jose
2020-02-20 18:06:31 -04:00
parent 9481b6a1e6
commit 01eaccc1da
22 changed files with 312 additions and 318 deletions
+3 -3
View File
@@ -67,8 +67,8 @@ for _jail in ${JAILS}; do
## test if running
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)
if [ -n "${bastille_jail_loopback}" ]; then
pfctl -q -t jails -T delete "$(jls -j "${_jail}" ip4.addr)"
fi
## remove rctl limits
@@ -80,7 +80,7 @@ for _jail in ${JAILS}; do
## stop container
echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}"
jail -f "${bastille_jailsdir}/${_jail}/jail.conf" -r ${_jail}
jail -f "${bastille_jailsdir}/${_jail}/jail.conf" -r "${_jail}"
fi
echo
done