forked from evolix/evobackup
naming conventions
This commit is contained in:
parent
7a80b433d6
commit
092b204be2
18
bkctld
18
bkctld
|
@ -18,7 +18,7 @@ set -u
|
||||||
. "${LIBDIR}/includes"
|
. "${LIBDIR}/includes"
|
||||||
|
|
||||||
subcommand="${1:-}"
|
subcommand="${1:-}"
|
||||||
jail="${2:-}"
|
jail_name="${2:-}"
|
||||||
option="${3:-}"
|
option="${3:-}"
|
||||||
|
|
||||||
if [ ! -x "${LIBDIR}/bkctld-${subcommand}" ]; then
|
if [ ! -x "${LIBDIR}/bkctld-${subcommand}" ]; then
|
||||||
|
@ -30,23 +30,23 @@ case "${subcommand}" in
|
||||||
"${LIBDIR}/bkctld-${subcommand}"
|
"${LIBDIR}/bkctld-${subcommand}"
|
||||||
;;
|
;;
|
||||||
"init" | "is-on")
|
"init" | "is-on")
|
||||||
"${LIBDIR}/bkctld-${subcommand}" "${jail}"
|
"${LIBDIR}/bkctld-${subcommand}" "${jail_name}"
|
||||||
;;
|
;;
|
||||||
"key" | "port" | "ip")
|
"key" | "port" | "ip")
|
||||||
"${LIBDIR}/bkctld-${subcommand}" "${jail}" "${option}"
|
"${LIBDIR}/bkctld-${subcommand}" "${jail_name}" "${option}"
|
||||||
;;
|
;;
|
||||||
"start" | "stop" | "reload" | "restart" | "sync" | "update" | "remove" | "firewall")
|
"start" | "stop" | "reload" | "restart" | "sync" | "update" | "remove" | "firewall")
|
||||||
if [ "${jail}" = "all" ]; then
|
if [ "${jail_name}" = "all" ]; then
|
||||||
"${LIBDIR}/bkctld-list"|xargs --no-run-if-empty --max-args=1 --max-procs=0 "${LIBDIR}/bkctld-${subcommand}"
|
"${LIBDIR}/bkctld-list" | xargs --no-run-if-empty --max-args=1 --max-procs=0 "${LIBDIR}/bkctld-${subcommand}"
|
||||||
else
|
else
|
||||||
"${LIBDIR}/bkctld-${subcommand}" "${jail}"
|
"${LIBDIR}/bkctld-${subcommand}" "${jail_name}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"status")
|
"status")
|
||||||
if [ -z "${jail}" ]; then
|
if [ "${jail_name}" = "all" ] || [ -z "${jail_name}" ]; then
|
||||||
"${LIBDIR}/bkctld-list"|xargs --no-run-if-empty --max-args=1 "${LIBDIR}/bkctld-${subcommand}"
|
"${LIBDIR}/bkctld-list" | xargs --no-run-if-empty --max-args=1 "${LIBDIR}/bkctld-${subcommand}"
|
||||||
else
|
else
|
||||||
"${LIBDIR}/bkctld-${subcommand}" "${jail}"
|
"${LIBDIR}/bkctld-${subcommand}" "${jail_name}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue