mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +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 %}
|
# {% raw %}
|
||||||
|
|
||||||
print_line() {
|
print_line() {
|
||||||
is_tty
|
|
||||||
local service_name="${1}"
|
local service_name="${1}"
|
||||||
local service_state="" ; service_state="$( parse_status "${1}" "${2}" )"
|
local service_state="" ; service_state="$( parse_status "${1}" "${2}" )"
|
||||||
# XXX: What will we do if tput isn't avalable?
|
# XXX: What will we do if tput isn't avalable?
|
||||||
local line=""
|
local line=""
|
||||||
|
local PADDING_CONSTANT=""
|
||||||
local columns=35 # value used if not printing to a tty
|
local columns=35 # value used if not printing to a tty
|
||||||
local PADDING_CONSTANT=16 # two tabs wide
|
|
||||||
|
|
||||||
if (( __tty == 1 )); then
|
if (( __tty == 1 )); then
|
||||||
local NC; NC="$(tput sgr0)" # no color
|
local NC; NC="$(tput sgr0)" # no color
|
||||||
local red; red="$(tput setaf 1 bold)"
|
local red; red="$(tput setaf 1 bold)"
|
||||||
local green; green="$(tput setaf 2 bold)"
|
local green; green="$(tput setaf 2 bold)"
|
||||||
local yellow; yellow="$(tput setaf 3 bold)"
|
local yellow; yellow="$(tput setaf 3 bold)"
|
||||||
|
PADDING_CONSTANT=16 # two tabs wide
|
||||||
|
|
||||||
columns=$(tput cols)
|
columns=$(tput cols)
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user