2019-01-08 16:23:46 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# List jails
|
|
|
|
# Usage: list
|
|
|
|
#
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2020-04-01 07:31:33 +02:00
|
|
|
# shellcheck source=config
|
2019-01-08 16:23:46 +01:00
|
|
|
LIBDIR="$(dirname $0)" && . "${LIBDIR}/config"
|
|
|
|
|
|
|
|
[ -d "${JAILDIR}" ] || exit 0
|
2020-04-01 07:27:43 +02:00
|
|
|
#TODO: try if this command works the same :
|
|
|
|
# find "${JAILDIR}" -mindepth 1 -maxdepth 1 -type d -printf '%f\n'
|
2019-01-08 16:23:46 +01:00
|
|
|
find "${JAILDIR}" -mindepth 1 -maxdepth 1 -type d|sed 's!.*/!!'
|