From 3fe3f420f697801701bb681455d930e665c8a93c Mon Sep 17 00:00:00 2001 From: thespad Date: Wed, 11 Sep 2024 19:59:09 +0100 Subject: [PATCH] Don't run through mod setup on restart --- root/etc/s6-overlay/s6-rc.d/init-mod-swag-crowdsec/run | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-swag-crowdsec/run b/root/etc/s6-overlay/s6-rc.d/init-mod-swag-crowdsec/run index 5109556..9c61ad4 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-mod-swag-crowdsec/run +++ b/root/etc/s6-overlay/s6-rc.d/init-mod-swag-crowdsec/run @@ -5,6 +5,11 @@ CONFIG_PATH="/config/crowdsec/" LIB_PATH="/usr/local/lua/crowdsec/" DATA_PATH="/var/lib/crowdsec/lua/" +if [[ ! -e "/crowdsec-nginx-bouncer.tgz" ]]; then + # Crowdsec bouncer already configured + exit 0 +fi + echo "**** Configuring CrowdSec nginx Bouncer ****" # If API keys are missing, disable mod and exit