mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-20 17:20:12 +01:00
only accept one target for top
This commit is contained in:
@@ -42,26 +42,15 @@ case "${1}" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
# Accept only one argument
|
||||||
usage
|
if [ $# -eq 0 ] || [ $# -gt 1 ]; then
|
||||||
else
|
|
||||||
TARGET="${1}"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TARGET}" = "ALL" ]; then
|
|
||||||
target_all_jails
|
|
||||||
else
|
|
||||||
check_target_exists "${TARGET}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $# -ne 0 ]; then
|
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set_target_single "${1}"
|
||||||
bastille_root_check
|
bastille_root_check
|
||||||
|
|
||||||
for _jail in ${JAILS}; do
|
for _jail in "${JAILS}"; do
|
||||||
check_target_is_running "${_jail}"
|
check_target_is_running "${_jail}"
|
||||||
info "[${_jail}]:"
|
info "[${_jail}]:"
|
||||||
jexec -l "${_jail}" /usr/bin/top
|
jexec -l "${_jail}" /usr/bin/top
|
||||||
|
|||||||
Reference in New Issue
Block a user