Add set_target function

This commit is contained in:
tschettervictor
2024-12-16 17:44:36 -07:00
committed by GitHub
parent 3aeb17c4e2
commit 31cc087ef3

View File

@@ -92,6 +92,15 @@ check_target_is_running() {
fi
}
set_target() {
if [ "{1}" = ALL ] || [ "{1}" = all]; then
target_all_jails
else
TARGET="{1}"
check_target_exists "{TARGET}"
fi
}
target_all_jails() {
_JAILS=$(/usr/sbin/jls name)
JAILS=""