From d5b16fe0827745409206fc5df0fe06d8fa293ff7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 3 Mar 2020 17:02:47 +0100 Subject: [PATCH] Fix maison bbc website and monitoring --- modules/acme2.nix | 3 ++- modules/private/monitoring/plugins/check_maison_bbc | 6 +++--- modules/private/websites/papa/maison_bbc.nix | 7 +++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/acme2.nix b/modules/acme2.nix index 6c6d9a7..b22e4cc 100644 --- a/modules/acme2.nix +++ b/modules/acme2.nix @@ -232,7 +232,8 @@ in # gets changed, the activation phase restarts it, meaning # the permissions of the StateDirectory get adjusted # according to the specified group - RemainAfterExit = true; + # Edit: Timers will never run because of this + # RemainAfterExit = true; SuccessExitStatus = [ "0" "1" ]; User = data.user; Group = data.group; diff --git a/modules/private/monitoring/plugins/check_maison_bbc b/modules/private/monitoring/plugins/check_maison_bbc index 43a5817..4a2f799 100755 --- a/modules/private/monitoring/plugins/check_maison_bbc +++ b/modules/private/monitoring/plugins/check_maison_bbc @@ -6,10 +6,10 @@ alert=$(date +"%F %H:%M:%S" -d "3 hours ago") res=$(curl https://maison.bbc.bouya.org/stats.php) -ignored_text="th_hr Exterieure th_hr Soufflage" +ignored_text="Exterieure Soufflage Mezzanine" -ignored_bat="^$" -ignored="^(th_hr Exterieure|th_hr Soufflage)$" +ignored_bat="^(Temp_Nord|Exterieure|Soufflage|Mezzanine)$" +ignored="^(th_hr Exterieure|th_hr Soufflage|th_hr Mezzanine)$" missing() { echo "to_entries|[.[]|select(.value < \"$alert\" and .key != \"bat\" $1)|.key + \": \" + .value]|join(\" ; \")" diff --git a/modules/private/websites/papa/maison_bbc.nix b/modules/private/websites/papa/maison_bbc.nix index 7295de8..eb61b6d 100644 --- a/modules/private/websites/papa/maison_bbc.nix +++ b/modules/private/websites/papa/maison_bbc.nix @@ -23,6 +23,7 @@ in { php_admin_value[open_basedir] = "${varDir}" ''; phpOptions = config.services.phpfpm.phpOptions + '' + date.timezone = 'Europe/Paris' extension=${pkgs.php}/lib/php/extensions/mysqli.so ''; }; @@ -33,6 +34,7 @@ in { root = varDir; extraConfig = [ '' + Alias /.well-known/acme-challenge ${config.security.acme2.certs.papa.webroot}/.well-known/acme-challenge RedirectMatch 301 ^/((?!(\.well-known|add.php).*$).*)$ https://maison.bbc.bouya.org/$1 DirectoryIndex index.php index.htm index.html @@ -41,6 +43,11 @@ in { SetHandler "proxy:unix:/run/phpfpm/papa_maison_bbc.sock|fcgi://localhost" + + + Options Indexes FollowSymLinks + AllowOverride None + Require all granted '' ]; -- 2.41.0