updating Usage output and standardizing target variable

This commit is contained in:
Christer Edwards
2019-11-22 22:04:38 -07:00
parent 49065ca95a
commit 62a3821223
+5 -4
View File
@@ -32,7 +32,7 @@
. /usr/local/etc/bastille/bastille.conf . /usr/local/etc/bastille/bastille.conf
usage() { usage() {
echo -e "${COLOR_RED}Usage: bastille start [ALL|glob].${COLOR_RESET}" echo -e "${COLOR_RED}Usage: bastille start TARGET${COLOR_RESET}"
exit 1 exit 1
} }
@@ -48,12 +48,13 @@ if [ $# -gt 1 ] || [ $# -lt 1 ]; then
fi fi
TARGET="${1}" TARGET="${1}"
shift
if [ "$TARGET" = 'ALL' ]; then if [ "${TARGET}" = 'ALL' ]; then
JAILS=$(bastille list jails) JAILS=$(bastille list jails)
fi fi
if [ "$TARGET" != 'ALL' ]; then if [ "${TARGET}" != 'ALL' ]; then
JAILS=$(bastille list jails | grep -w "$TARGET") JAILS=$(bastille list jails | grep -w "${TARGET}")
fi fi
for _jail in ${JAILS}; do for _jail in ${JAILS}; do