Skip to content

Commit

Permalink
Update common.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tschettervictor authored Dec 21, 2024
1 parent 200321c commit d458ed8
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions usr/local/share/bastille/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,20 +173,12 @@ EOF
fi
}

set_target() {
if [ "${1}" = ALL ] || [ "${1}" = all ]; then
target_all_jails
else
TARGET="${1}"
fi
}

set_target() {
local _TARGET="${1}"
if [ "${_TARGET}" = ALL ] || [ "${_TARGET}" = all ]; then
target_all_jails
else
check_target_exists "${_TARGET}"
check_target_exists "${_TARGET}" || exit
JAILS="${_TARGET}"
TARGET="${_TARGET}"
export JAILS
Expand All @@ -197,10 +189,9 @@ set_target() {
set_target_single() {
local _TARGET="${1}"
if [ "${_TARGET}" = ALL ] || [ "${_TARGET}" = all ]; then
error_notify "[all|ALL] not supported with this command."
return 1
error_exit "[all|ALL] not supported with this command."
else
check_target_exists "${_TARGET}"
check_target_exists "${_TARGET}" || exit
JAILS="${_TARGET}"
TARGET="${_TARGET}"
export JAILS
Expand Down

0 comments on commit d458ed8

Please sign in to comment.