mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Don't set the padding constant if not in a tty
This will preserve the original width from before my changes
This commit is contained in:
@@ -170,19 +170,19 @@ parse_status() {
|
||||
# {% raw %}
|
||||
|
||||
print_line() {
|
||||
is_tty
|
||||
local service_name="${1}"
|
||||
local service_state="" ; service_state="$( parse_status "${1}" "${2}" )"
|
||||
# XXX: What will we do if tput isn't avalable?
|
||||
local line=""
|
||||
local PADDING_CONSTANT=""
|
||||
local columns=35 # value used if not printing to a tty
|
||||
local PADDING_CONSTANT=16 # two tabs wide
|
||||
|
||||
if (( __tty == 1 )); then
|
||||
local NC; NC="$(tput sgr0)" # no color
|
||||
local red; red="$(tput setaf 1 bold)"
|
||||
local green; green="$(tput setaf 2 bold)"
|
||||
local yellow; yellow="$(tput setaf 3 bold)"
|
||||
PADDING_CONSTANT=16 # two tabs wide
|
||||
|
||||
columns=$(tput cols)
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user