diff --git a/server/README.md b/server/README.md index de53c96..6c9247f 100644 --- a/server/README.md +++ b/server/README.md @@ -49,6 +49,12 @@ You can deploy test environments with Vagrant : vagrant up ~~~ +To destroy Vagrant VMs : + +~~~ +vagrant destroy +~~~ + ### Deployment Run `vagrant rsync-auto` in a terminal for automatic synchronization of diff --git a/server/bkctld b/server/bkctld index 03535d3..2fd07ea 100755 --- a/server/bkctld +++ b/server/bkctld @@ -53,6 +53,9 @@ while :; do -f|--force) export FORCE=1 ;; + --no-header) + export HEADER=0 + ;; *) # Default case: If no more options then break out of the loop. break @@ -116,7 +119,9 @@ case "${subcommand}" in ;; "status") 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 for jail in $("${LIBDIR}/bkctld-list"); do "${LIBDIR}/bkctld-${subcommand}" "${jail}" diff --git a/server/lib/bkctld-status b/server/lib/bkctld-status index b7cadbb..5546d63 100755 --- a/server/lib/bkctld-status +++ b/server/lib/bkctld-status @@ -1,7 +1,7 @@ #!/bin/sh # # Description: Display status of SSH server -# Usage: status [|all] +# Usage: [--no-header] status [|all] # # shellcheck source=./includes diff --git a/server/lib/includes b/server/lib/includes index 3653c40..6d6d285 100755 --- a/server/lib/includes +++ b/server/lib/includes @@ -29,6 +29,7 @@ CRITICAL="${CRITICAL:-48}" WARNING="${WARNING:-24}" DUC=$(command -v duc-nox || command -v duc) FORCE="${FORCE:-0}" +HEADER="${HEADER:-1}" show_version() { cat <