mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-20 01:02:36 +01:00
error handling
This commit is contained in:
@@ -42,16 +42,15 @@ case "${1}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Accept only one argument
|
||||
if [ $# -eq 0 ] || [ $# -gt 1 ]; then
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
TARGET="${1}"
|
||||
|
||||
bastille_root_check
|
||||
set_target_single "${TARGET}"
|
||||
check_target_exists "${TARGET}"
|
||||
check_target_is_running "${TARGET}"
|
||||
check_target_is_running "${TARGET}" || exit
|
||||
|
||||
bastille_jail_path="$(/usr/sbin/jls -j "${TARGET}" path)"
|
||||
if [ ! -x "${bastille_jail_path}/usr/local/bin/top" ]; then
|
||||
|
||||
Reference in New Issue
Block a user