mirror of
https://github.com/hackacad/bastille.git
synced 2026-03-29 05:04:32 +02:00
Restrict to running jails
This commit is contained in:
@@ -145,7 +145,15 @@ clone|cmd|console|convert|cp|edit|export|htop|limits|mount|pkg|rename|service|st
|
||||
shift
|
||||
|
||||
if [ "${TARGET}" = 'ALL' ]; then
|
||||
JAILS=$(ls ${bastille_jailsdir})
|
||||
_JAILS=$(jls name)
|
||||
JAILS=""
|
||||
for _jail in ${_JAILS}; do
|
||||
_JAILPATH=$(jls -j "${_jail}" path)
|
||||
if [ -z ${_JAILPATH##${bastille_jailsdir}*} ]; then
|
||||
JAILS="${JAILS} ${_jail}"
|
||||
fi
|
||||
done
|
||||
|
||||
else
|
||||
JAILS=$(jls name | awk "/^${TARGET}$/")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user