Add a header for bktcld status output.
This commit is contained in:
parent
4f9b56d7a4
commit
0b777b4a3f
1
bkctld
1
bkctld
|
@ -116,6 +116,7 @@ case "${subcommand}" in
|
|||
;;
|
||||
"status")
|
||||
jail_name="${2:-}"
|
||||
printf '%-30s %-10s %-10s %-10s %-40s\n' 'Jail name' 'Status' 'Port' 'Retention policy (day/month)' 'IP'
|
||||
if [ "${jail_name}" = "all" ] || [ -z "${jail_name}" ]; then
|
||||
for jail in $("${LIBDIR}/bkctld-list"); do
|
||||
"${LIBDIR}/bkctld-${subcommand}" "${jail}"
|
||||
|
|
|
@ -18,7 +18,7 @@ incs_policy="0"
|
|||
if [ -r "${incs_policy_file}" ]; then
|
||||
days=$(grep "^\+" "${incs_policy_file}" | grep --count "day")
|
||||
months=$(grep "^\+" "${incs_policy_file}" | grep --count "month")
|
||||
incs_policy="${days}d/${months}m"
|
||||
incs_policy="${days}/${months}"
|
||||
fi
|
||||
|
||||
status="OFF"
|
||||
|
|
Loading…
Reference in a new issue