Use mdoc(7) instead of markdown #6
15
bkctld
15
bkctld
|
@ -35,20 +35,7 @@ case "${subcommand}" in
|
|||
;;
|
||||
"start" | "stop" | "reload" | "restart" | "sync" | "update" | "remove")
|
||||
if [ "${jail}" = "all" ]; then
|
||||
jails=$(ls "${JAILDIR}")
|
||||
for jail in ${jails}; do
|
||||
case "${subcommand}" in
|
||||
"start")
|
||||
check_jail_on "${jail}" || "${LIBDIR}/bkctld-${subcommand}" "${jail}"
|
||||
;;
|
||||
"stop" | "reload" | "restart")
|
||||
check_jail_on "${jail}" && "${LIBDIR}/bkctld-${subcommand}" "${jail}"
|
||||
;;
|
||||
*)
|
||||
"${LIBDIR}/bkctld-${subcommand}" "${jail}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
ls "${JAILDIR}"|xargs --no-run-if-empty --max-args=1 --max-procs=0 "${LIBDIR}/bkctld-${subcommand}"
|
||||
else
|
||||
"${LIBDIR}/bkctld-${subcommand}" "${jail}"
|
||||
fi
|
||||
|
|
|
@ -5,7 +5,7 @@ LIBDIR="$(dirname $0)" && . "${LIBDIR}/config"
|
|||
jail="${1:-}"
|
||||
[ -n "${jail}" ] || usage
|
||||
check_jail "${jail}" || error "${jail} : trying to reload inexistant jail"
|
||||
check_jail_on "${jail}" || error "${jail} : trying to reload not running jail"
|
||||
check_jail_on "${jail}" || exit 0
|
||||
|
||||
pid=$(cat "${JAILDIR}/${jail}/${SSHD_PID}")
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ LIBDIR="$(dirname $0)" && . "${LIBDIR}/config"
|
|||
jail="${1:-}"
|
||||
[ -n "${jail}" ] || usage
|
||||
check_jail "${jail}" || error "${jail} : trying to start inexistant jail"
|
||||
check_jail_on "${jail}" && error "${jail} : trying to start already running jail"
|
||||
check_jail_on "${jail}" && exit 0
|
||||
|
||||
cd "${JAILDIR}/${jail}"
|
||||
grep -q "${JAILDIR}/${jail}/proc" /proc/mounts || mount -t proc "proc-${jail}" proc
|
||||
|
|
|
@ -5,7 +5,7 @@ LIBDIR="$(dirname $0)" && . "${LIBDIR}/config"
|
|||
jail="${1:-}"
|
||||
[ -n "${jail}" ] || usage
|
||||
check_jail "${jail}" || error "${jail} : trying to stop inexistant jail"
|
||||
check_jail_on "${jail}" || error "${jail} : trying to stop not running jail"
|
||||
check_jail_on "${jail}" || exit 0
|
||||
|
||||
pid=$(cat "${JAILDIR}/${jail}/${SSHD_PID}")
|
||||
for conn in $(ps --ppid "${pid}" -o pid=); do
|
||||
|
|
Loading…
Reference in a new issue