From 49f52c8473324f9c2516e6fa35bdd4866b7ccff9 Mon Sep 17 00:00:00 2001 From: baudneo Date: Sat, 19 Feb 2022 03:32:33 -0700 Subject: [PATCH] Fix copy+paste error where the contents of 98_logging-options.sh was included in the 99_crowdsec-openresty-bouncer.sh file. --- .../99_crowdsec-openresty-bouncer.sh | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/docker/rootfs/etc/cont-init.d/99_crowdsec-openresty-bouncer.sh b/docker/rootfs/etc/cont-init.d/99_crowdsec-openresty-bouncer.sh index 0baaed9b..1b7e7fe5 100755 --- a/docker/rootfs/etc/cont-init.d/99_crowdsec-openresty-bouncer.sh +++ b/docker/rootfs/etc/cont-init.d/99_crowdsec-openresty-bouncer.sh @@ -4,37 +4,6 @@ set -e # Exit immediately if a command exits with a non-zero status. set -u # Treat unset variables as an error. -# Redirect admin panel logs from /dev/null to log files if enabled -if [[ ${ADMIN_PANEL_LOG} == "1" ]] || [[ ${ADMIN_PANEL_LOG} -eq 1 ]]; then - echo "Enabling admin dashboard logging" - echo "ADMIN_PANEL_LOG = $ADMIN_PANEL_LOG" - sed-patch 's||/data/logs/admin-panel_access.log standard|' /etc/nginx/conf.d/production.conf - sed-patch 's||/data/logs/admin-panel_error.log warn|' /etc/nginx/conf.d/production.conf -else - echo "Leaving admin dashboard logging off (default behavior)" - echo "ADMIN_PANEL_LOG = $ADMIN_PANEL_LOG" - sed-patch 's||/dev/null|' /etc/nginx/conf.d/production.conf - sed-patch 's||/dev/null|' /etc/nginx/conf.d/production.conf -fi - -if [[ ${OPENRESTY_DEBUG} == "1" ]] || [[ ${OPENRESTY_DEBUG} -eq 1 ]]; then - echo "Changing OpenResty ERROR (fallback_error.log) logging to level: DEBUG" - echo "OPENRESTY_DEBUG = $OPENRESTY_DEBUG" - sed-patch 's||debug|' /etc/nginx/nginx.conf - -else - echo "Leaving OpenResty ERROR (fallback_error.log) logging at level: WARN (default behavior)" - echo "OPENRESTY_DEBUG = $OPENRESTY_DEBUG" - sed-patch 's||warn|' /etc/nginx/nginx.conf -fi - -❯ cat docker/rootfs/etc/cont-init.d/99_crowdsec-openresty-bouncer.sh -#!/usr/bin/with-contenv bash -# shellcheck shell=bash - -set -e # Exit immediately if a command exits with a non-zero status. -set -u # Treat unset variables as an error. - log() { echo "[cont-init.d] $(basename "$0"): $*" }