Skip to content

Commit 33e0a6c

Browse files
authored
add browsers-file to goan_config if ENABLE_BROWSERS_LIST is true
1 parent 4df102f commit 33e0a6c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

resources/scripts/logs/traefik.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function traefik_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
}
@@ -35,9 +35,14 @@ function traefik_goaccess_config(){
3535
echo "time-format %T" >> ${goan_config}
3636
echo "date-format %d/%b/%Y" >> ${goan_config}
3737
echo "log-format %h %^[%d:%t %^] \"%r\" %s %b \"%R\" \"%u\" %Lm" >> ${goan_config}
38-
echo "port 7890" >> ${goan_config}
38+
echo "port 7890" >> ${goan_config}
3939
echo "real-time-html true" >> ${goan_config}
4040
echo "output ${nginx_html}" >> ${goan_config}
41+
if [[ "${ENABLE_BROWSERS_LIST}" == "True" || ${ENABLE_BROWSERS_LIST} == true ]]; then
42+
echo -e "\n\tENABLING TRAEFIK INSTANCE GOACCESS BROWSERS LIST"
43+
browsers_file="/goaccess-config/browsers.list"
44+
echo "browsers-file ${browsers_file}" >> ${goan_config}
45+
fi
4146
}
4247

4348
function traefik(){
@@ -57,7 +62,7 @@ function traefik(){
5762

5863
echo -e "\n#GOAN_PROXY_FILES" >> ${goan_config}
5964
if [[ -d "${goan_log_path}" ]]; then
60-
65+
6166
echo -e "\n\tAdding proxy logs..."
6267
IFS=$'\n'
6368

@@ -107,7 +112,7 @@ function traefik(){
107112
echo -e "\nSKIP ARCHIVED LOGS"
108113
echo "-------------------------------"
109114
echo "FEATURE NOT AVAILABLE FOR TRAEFIK"
110-
115+
111116
#write out loading page
112117
echo "<!doctype html><html><head>" > ${nginx_html}
113118
echo "<title>GOAN - ${goan_version}</title>" >> ${nginx_html}

0 commit comments

Comments
 (0)