diff --git a/modules/mail/clamav.nix b/modules/mail/clamav.nix index 548d1d8..bfb8d45 100644 --- a/modules/mail/clamav.nix +++ b/modules/mail/clamav.nix @@ -65,8 +65,8 @@ let " fi - printf "Subject: [ADMIN] $SUBJECT\n\n$TECH_BODY" | /run/wrappers/bin/sendmail -t "$ADMIN_EMAIL" - printf "Subject: [Alerte] Menace détectée sur votre serveur Numbus\n\n$FRIENDLY_BODY\n\nMerci de votre confiance,\nL'équipe de support,\nNumbus-Server." | /run/wrappers/bin/sendmail -t "$USER_EMAIL" + printf "Subject: [ADMIN] %s\n\n%s" "$SUBJECT" "$TECH_BODY" | /run/wrappers/bin/sendmail -t "$ADMIN_EMAIL" + printf "Subject: [Alerte] Menace détectée sur votre serveur Numbus\n\n%s\n\nMerci de votre confiance,\nL'équipe de support,\nNumbus-Server." "$FRIENDLY_BODY" | /run/wrappers/bin/sendmail -t "$USER_EMAIL" ''; in diff --git a/modules/services/clamav.nix b/modules/services/clamav.nix index 457afbc..3e6874b 100644 --- a/modules/services/clamav.nix +++ b/modules/services/clamav.nix @@ -5,7 +5,7 @@ with lib; let cfg = config.numbus.services.clamav; onAccessPaths = lib.mapAttrsToList (n: v: v.dataDir) (lib.filterAttrs (n: v: - v ? enable && v.enable && v ? dataDir && v.dataDir != false + v ? enable && v.enable && v ? dataDir && v.dataDir != null && v.dataDir != false ) config.numbus.services); in @@ -46,7 +46,7 @@ in settings = { OnAccessPrevention = true; OnAccessIncludePath = onAccessPaths; - VirusEvent = "echo 'CLAM_VIRUSEVENT_VIRUSNAME=\"%v\"\nCLAM_VIRUSEVENT_FILENAME=\"%f\"' > /var/lib/clamav/virus_event.env && /run/wrappers/bin/sudo /run/current-system/sw/bin/systemctl start clamav-virus-notify.service"; + VirusEvent = "printf 'CLAM_VIRUSEVENT_VIRUSNAME=\"%v\"\\nCLAM_VIRUSEVENT_FILENAME=\"%f\"\\n' > /var/lib/clamav/virus_event.env && /run/wrappers/bin/sudo /run/current-system/sw/bin/systemctl start clamav-virus-notify.service"; }; }; }; diff --git a/modules/services/nextcloud.nix b/modules/services/nextcloud.nix index a90eb1d..9472d7a 100644 --- a/modules/services/nextcloud.nix +++ b/modules/services/nextcloud.nix @@ -243,7 +243,7 @@ helper.mkPodmanService { $OCC maintenance:repair --include-expensive INSTALL_APPS_LIST=( "calendar" "contacts" "mail" "notes" "onlyoffice" "cookbook" "whiteboard" ) - REMOVE_APPS_LIST=( "activity" "federation" "webhook_listeners" "photos" "recommendations" "sharebymail" "teams" "support" "richdocumentscode" ) + DISABLE_APPS_LIST=( "activity" "federation" "webhook_listeners" "photos" "recommendations" "sharebymail" "teams" "support" "richdocumentscode" ) for app in ''${INSTALL_APPS_LIST[@]}; do if ! $OCC --no-warnings app:list | grep -iq "$app:"; then @@ -253,13 +253,10 @@ helper.mkPodmanService { $OCC --no-warnings app:enable "$app" fi done - for app in ''${REMOVE_APPS_LIST[@]}; do + for app in ''${DISABLE_APPS_LIST[@]}; do if $OCC --no-warnings app:list --enabled | grep -iq "$app:"; then $OCC --no-warnings app:disable "$app" fi - if $OCC --no-warnings app:list | grep -iq "$app:"; then - $OCC --no-warnings app:remove "$app" - fi done $OCC --no-warnings config:system:set onlyoffice DocumentServerInternalUrl --value="https://onlyoffice.${config.numbus.services.domain}/" $OCC --no-warnings config:system:set onlyoffice DocumentServerUrl --value="https://onlyoffice.${config.numbus.services.domain}/"