Update htop.sh

This commit is contained in:
tschettervictor
2024-12-20 22:41:00 -07:00
committed by GitHub
parent d458ed8ee1
commit 4a93f61c2a

View File

@@ -36,7 +36,7 @@ usage() {
}
# Handle special-case commands first.
case "$1" in
case "${1}" in
help|-h|--help)
usage
;;
@@ -52,11 +52,11 @@ bastille_root_check
set_target_single "${TARGET}"
check_target_is_running "${TARGET}" || exit
bastille_jail_path="$(/usr/sbin/jls -j "${TARGET}" path)"
bastille_jail_path=$(/usr/sbin/jls -j "${_jail}" path)
if [ ! -x "${bastille_jail_path}/usr/local/bin/htop" ]; then
error_notify "htop not found on ${TARGET}."
error_notify "htop not found on ${_jail}."
elif [ -x "${bastille_jail_path}/usr/local/bin/htop" ]; then
info "[${TARGET}]:"
jexec -l "${TARGET}" /usr/local/bin/htop
info "[${_jail}]:"
jexec -l ${_jail} /usr/local/bin/htop
fi
echo -e "${COLOR_RESET}"