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