From 4af308fdd5804b08b707b05dfdb8a60cc430a6d6 Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Fri, 14 May 2021 13:12:56 +0000 Subject: [PATCH] GoAccessRC added to basic settings, so tabbed_details nginx logs can be easily processed. --- one-time-stuff/basic-settings.sh | 15 +++++++++++++++ one-time-stuff/conf/goaccessrc | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 one-time-stuff/conf/goaccessrc diff --git a/one-time-stuff/basic-settings.sh b/one-time-stuff/basic-settings.sh index dc32b24..cec884f 100755 --- a/one-time-stuff/basic-settings.sh +++ b/one-time-stuff/basic-settings.sh @@ -110,6 +110,21 @@ esac # ---------------------------------------------------------- +echo "----- Install GoAccess configuration ----------------" +read -p 'Add GoAccess RC config file? [y/N]: ' set_gorc +case $set_gorc in + [Yy]* ) + echo 'Installing GoAccess RC' + LOCATION=`dirname "$0"` + cp "${LOCATION}/conf/goaccessrc" "${HOME}/.goaccessrc" + ;; + * ) + echo 'Skipping' + ;; +esac + +# ---------------------------------------------------------- + echo "----- Append prompt style to ~/.bashrc --------------" read -p 'Add prompt style to bash config? [y/N]: ' add_style case $add_style in diff --git a/one-time-stuff/conf/goaccessrc b/one-time-stuff/conf/goaccessrc new file mode 100644 index 0000000..28ee505 --- /dev/null +++ b/one-time-stuff/conf/goaccessrc @@ -0,0 +1,8 @@ +# comment + +date-format %d/%b/%Y + +time-format %H:%M:%S + +log-format %h\t%e\t[%d:%t %^]\t(%K/%k)\t%v\t"%r"\t%s\t%b\t"%R"\t"%u" +