From 42110eb1967a6b968658fb239a563a84637101e0 Mon Sep 17 00:00:00 2001 From: Andrey Limachko Date: Tue, 6 Dec 2022 19:33:58 +0400 Subject: [PATCH] Added general information about the tool --- domain-diag | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/domain-diag b/domain-diag index 5a24757..ac4444b 100755 --- a/domain-diag +++ b/domain-diag @@ -174,6 +174,21 @@ __log_force_print() tee -a "$logfile" } +print_head() +{ + __header | __log + __check_title "| Samba environment diagnostic tool |" | __log + __delimiter | __log + echo "Version: $VERSION" | __log + echo "Date: $(date)" | __log + __delimiter | __log + echo "System information" | __log + echo "Kernel: $(uname -r)" | __log + echo "Branch: $(apt-repo list | cut -d ' ' -f 2 | grep -e '^\[.*\]$' | tail -1 | sed -E 's/\[(.*)\]/\1/')" | __log + __footer | __log + __newline | __log +} + run() { local retval=126 @@ -562,6 +577,7 @@ init_vars() test -z $listcmd || runcmd=list_run init_log +print_head init_vars test -z "$customcmd" || runcmd=custom_run