From 62a3821223a894dde157094341fe0e2974f7181e Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Fri, 22 Nov 2019 22:04:38 -0700 Subject: [PATCH] updating Usage output and standardizing target variable --- usr/local/share/bastille/start.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr/local/share/bastille/start.sh b/usr/local/share/bastille/start.sh index ad14b624..4eafe2e3 100644 --- a/usr/local/share/bastille/start.sh +++ b/usr/local/share/bastille/start.sh @@ -32,7 +32,7 @@ . /usr/local/etc/bastille/bastille.conf usage() { - echo -e "${COLOR_RED}Usage: bastille start [ALL|glob].${COLOR_RESET}" + echo -e "${COLOR_RED}Usage: bastille start TARGET${COLOR_RESET}" exit 1 } @@ -48,12 +48,13 @@ if [ $# -gt 1 ] || [ $# -lt 1 ]; then fi TARGET="${1}" +shift -if [ "$TARGET" = 'ALL' ]; then +if [ "${TARGET}" = 'ALL' ]; then JAILS=$(bastille list jails) fi -if [ "$TARGET" != 'ALL' ]; then - JAILS=$(bastille list jails | grep -w "$TARGET") +if [ "${TARGET}" != 'ALL' ]; then + JAILS=$(bastille list jails | grep -w "${TARGET}") fi for _jail in ${JAILS}; do