mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
Fix cron auto-import env vars and health check log spam for Firefly III Data Importer
- Source /etc/environment in cronupdate to load addon env vars (FIREFLY_III_URL, etc.) - Persist cron-needed vars (JSON_CONFIGURATION_DIR, IMPORT_DIR_WHITELIST, etc.) to /etc/environment - Fix inverted nginx map values that caused health check logs to spam while suppressing real requests Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
This commit is contained in:
@@ -168,7 +168,7 @@ RUN \
|
||||
\
|
||||
# Handle Nginx configuration
|
||||
if [ -f /etc/nginx/nginx.conf ]; then \
|
||||
awk '/http \{/{print; print "map $http_user_agent $dontlog {\n default 0;\n \"~*HealthCheck\" 1;\n}\naccess_log /var/log/nginx/access.log combined if=$dontlog;"; next}1' /etc/nginx/nginx.conf > /etc/nginx/nginx.conf.new && \
|
||||
awk '/http \{/{print; print "map $http_user_agent $loggable {\n default 1;\n \"~*HealthCheck\" 0;\n}\naccess_log /var/log/nginx/access.log combined if=$loggable;"; next}1' /etc/nginx/nginx.conf > /etc/nginx/nginx.conf.new && \
|
||||
mv /etc/nginx/nginx.conf.new /etc/nginx/nginx.conf; \
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user