From 82a8d5479b2d9be36c94ecf3e1c4e94f86250d68 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Fri, 27 Dec 2024 08:17:49 -0700 Subject: [PATCH] minor tweak --- usr/local/share/bastille/htop.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr/local/share/bastille/htop.sh b/usr/local/share/bastille/htop.sh index c706cf17..10795da1 100644 --- a/usr/local/share/bastille/htop.sh +++ b/usr/local/share/bastille/htop.sh @@ -62,7 +62,7 @@ while [ "$#" -gt 0 ]; do esac done -if [ $# -ne 1 ]; then +if [ "$#" -ne 1 ]; then usage fi @@ -70,16 +70,18 @@ TARGET="${1}" bastille_root_check set_target_single "${TARGET}" + +info "[${TARGET}]:" check_target_is_running "${TARGET}" || if [ "${FORCE}" -eq 1 ]; then bastille start "${TARGET}" -else - exit +else + error_notify "Jail is not running." + error_continue "Use [-f|--force] to force start the jail." fi bastille_jail_path="${bastille_jailsdir}/${TARGET}/root" if [ ! -x "${bastille_jail_path}/usr/local/bin/htop" ]; then error_notify "htop not found on ${TARGET}." elif [ -x "${bastille_jail_path}/usr/local/bin/htop" ]; then - info "[${TARGET}]:" jexec -l ${TARGET} /usr/local/bin/htop fi