Added general information about the tool

This commit is contained in:
Андрей Лимачко 2022-12-06 19:33:58 +04:00
parent 410b2d8821
commit 42110eb196
Signed by untrusted user: liannnix
GPG Key ID: 1D8EEB2E408272C0

View File

@ -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