We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 268945d commit 396ef33Copy full SHA for 396ef33
rootfs/etc/cont-init.d/99_crowdsec-openresty-bouncer.sh
@@ -1,4 +1,5 @@
1
#!/usr/bin/with-contenv sh
2
+# shellcheck shell=sh
3
4
set -e # Exit immediately if a command exits with a non-zero status.
5
@@ -26,4 +27,12 @@ fi
26
27
#Make sure the config location is where we get the config from instead of /default/
28
sed -i 's|/defaults/crowdsec|/config/crowdsec|' /config/crowdsec/crowdsec-openresty-bouncer.conf
29
echo "Deploy Templates .."
-cp -r /defaults/crowdsec/templates/* /config/crowdsec/templates/
30
+
31
+#Make sure we only copy files that don't exist in config.
32
+for file in /defaults/crowdsec/templates/*
33
+do
34
+ if [ ! -e "/config/crowdsec/templates/${file}" ]
35
+ then
36
+ cp -r "/defaults/crowdsec/templates/${file}" "/config/crowdsec/templates/"
37
+ fi
38
+done
0 commit comments