Skip to content

Commit 1dda2c3

Browse files
authored
add browsers-file to goan_config if ENABLE_BROWSERS_LIST is true
1 parent d09db20 commit 1dda2c3

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

resources/scripts/logs/ncsa_combined.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function ncsa_combined_init(){
2121
if [[ -f ${html_config} ]]; then
2222
rm ${html_config}
2323
fi
24-
24+
2525
echo -n "" > ${archive_log}
2626
echo -n "" > ${active_log}
2727
}
@@ -36,9 +36,14 @@ function ncsa_combined_goaccess_config(){
3636
echo "date-format %d/%b/%Y" >> ${goan_config}
3737
#echo "log-format [%d:%t %^] %^ %s %^ %^ %m %^ %v \"%U\" [%^ %h] [%^ %b] %^\"%u\" \"%R\"" >> ${goan_config}
3838
echo "log-format %h %^[%d:%t %^] \"%r\" %s %b \"%R\" \"%u\"" >> ${goan_config}
39-
echo "port 7890" >> ${goan_config}
39+
echo "port 7890" >> ${goan_config}
4040
echo "real-time-html true" >> ${goan_config}
4141
echo "output ${nginx_html}" >> ${goan_config}
42+
if [[ "${ENABLE_BROWSERS_LIST}" == "True" || ${ENABLE_BROWSERS_LIST} == true ]]; then
43+
echo -e "\n\tENABLING NCSA_COMBINED INSTANCE GOACCESS BROWSERS LIST"
44+
browsers_file="/goaccess-config/browsers.list"
45+
echo "browsers-file ${browsers_file}" >> ${goan_config}
46+
fi
4247
}
4348

4449
function ncsa_combined(){
@@ -58,7 +63,7 @@ function ncsa_combined(){
5863

5964
echo -e "\n#GOAN_NCSA_COMBINED_LOG_FILES" >> ${goan_config}
6065
if [[ -d "${goan_log_path}" ]]; then
61-
66+
6267
echo -e "\n\tAdding proxy logs..."
6368
IFS=$'\n'
6469

@@ -106,7 +111,7 @@ function ncsa_combined(){
106111
echo -e "\nSKIP ARCHIVED LOGS"
107112
echo "-------------------------------"
108113
echo "FEATURE NOT AVAILABLE FOR NCSA_COMBINED"
109-
114+
110115
#write out loading page
111116
echo "<!doctype html><html><head>" > ${nginx_html}
112117
echo "<title>GOAN - ${goan_version}</title>" >> ${nginx_html}

0 commit comments

Comments
 (0)