Add --no-header option for status command.
This commit is contained in:
parent
f683691853
commit
aff5dbba95
|
@ -49,6 +49,12 @@ You can deploy test environments with Vagrant :
|
||||||
vagrant up
|
vagrant up
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
To destroy Vagrant VMs :
|
||||||
|
|
||||||
|
~~~
|
||||||
|
vagrant destroy
|
||||||
|
~~~
|
||||||
|
|
||||||
### Deployment
|
### Deployment
|
||||||
|
|
||||||
Run `vagrant rsync-auto` in a terminal for automatic synchronization of
|
Run `vagrant rsync-auto` in a terminal for automatic synchronization of
|
||||||
|
|
|
@ -53,6 +53,9 @@ while :; do
|
||||||
-f|--force)
|
-f|--force)
|
||||||
export FORCE=1
|
export FORCE=1
|
||||||
;;
|
;;
|
||||||
|
--no-header)
|
||||||
|
export HEADER=0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# Default case: If no more options then break out of the loop.
|
# Default case: If no more options then break out of the loop.
|
||||||
break
|
break
|
||||||
|
@ -116,7 +119,9 @@ case "${subcommand}" in
|
||||||
;;
|
;;
|
||||||
"status")
|
"status")
|
||||||
jail_name="${2:-}"
|
jail_name="${2:-}"
|
||||||
printf '%-30s %-10s %-10s %-25s %-20s\n' 'JAIL NAME' 'STATUS' 'PORT' 'RETENTION (DAY/MONTH)' 'IP'
|
if [ "${HEADER}" = "1" ]; then
|
||||||
|
printf '%-30s %-10s %-10s %-25s %-20s\n' 'JAIL NAME' 'STATUS' 'PORT' 'RETENTION (DAY/MONTH)' 'IP'
|
||||||
|
fi
|
||||||
if [ "${jail_name}" = "all" ] || [ -z "${jail_name}" ]; then
|
if [ "${jail_name}" = "all" ] || [ -z "${jail_name}" ]; then
|
||||||
for jail in $("${LIBDIR}/bkctld-list"); do
|
for jail in $("${LIBDIR}/bkctld-list"); do
|
||||||
"${LIBDIR}/bkctld-${subcommand}" "${jail}"
|
"${LIBDIR}/bkctld-${subcommand}" "${jail}"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Description: Display status of SSH server
|
# Description: Display status of SSH server
|
||||||
# Usage: status [<jailname>|all]
|
# Usage: [--no-header] status [<jailname>|all]
|
||||||
#
|
#
|
||||||
|
|
||||||
# shellcheck source=./includes
|
# shellcheck source=./includes
|
||||||
|
|
|
@ -29,6 +29,7 @@ CRITICAL="${CRITICAL:-48}"
|
||||||
WARNING="${WARNING:-24}"
|
WARNING="${WARNING:-24}"
|
||||||
DUC=$(command -v duc-nox || command -v duc)
|
DUC=$(command -v duc-nox || command -v duc)
|
||||||
FORCE="${FORCE:-0}"
|
FORCE="${FORCE:-0}"
|
||||||
|
HEADER="${HEADER:-1}"
|
||||||
|
|
||||||
show_version() {
|
show_version() {
|
||||||
cat <<END
|
cat <<END
|
||||||
|
|
Loading…
Reference in a new issue