Quiet Nextcloud. Include imagemagick (SVG support), more settings.
authorMatt Birkholz <matt@birchwood-abbey.net>
Thu, 20 Nov 2025 22:51:09 +0000 (15:51 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Thu, 20 Nov 2025 22:51:09 +0000 (15:51 -0700)
Eliminate some complaints in the Administration Overview page.

README.org
private/test-core-prep
roles_t/core/tasks/main.yml

index 7ba676e733b5cb0486225a55fde0b55fd716dfe6..59f487cef84ab51c5dda39ed6e67a5d4e8a9c51a 100644 (file)
@@ -1000,7 +1000,7 @@ final configuration "in position" (on a frontier).
 
 : $ sudo apt install mariadb-server php php-{apcu,bcmath,curl,gd,gmp}\
 : _                  php-{json,mysql,mbstring,intl,imagick,xml,zip} \
-: _                  libapache2-mod-php
+: _                  imagemagick libapache2-mod-php
 
 Similarly, the NAGIOS configuration required a handful of packages
 that were pre-loaded via cable modem (to test a frontier deployment).
@@ -4126,7 +4126,7 @@ installing a cron job.
     pkg: [ apache2, mariadb-server, php, php-apcu, php-bcmath,
            php-curl, php-gd, php-gmp, php-json, php-mysql,
            php-mbstring, php-intl, php-imagick, php-xml, php-zip,
-           libapache2-mod-php ]
+           imagemagick, libapache2-mod-php ]
 #+END_SRC
 
 Next, a number of Apache2 modules are enabled.
@@ -4638,17 +4638,41 @@ a complaint on the Settings > Administration > Overview web page.
 nextcloud_region:           US
 #+END_SRC
 
+It sets Nextcloud's "maintenance window" to start at 02:00MST
+(09:00UTC).  The interval is 4 hours, so ends at 06:00MST.  The
+documentation for the setting was found [[https://docs.nextcloud.com/server/31/admin_manual/configuration_server/background_jobs_configuration.html][here]].
+
+It also configures Nextcloud to send email with =/usr/sbin/sendmail=
+~From: webmaster@core.small.private~.  The documentation for the
+settings was found [[https://docs.nextcloud.com/server/31/admin_manual/configuration_server/email_configuration.html][here]] though just two parameters are set here, not
+the 9 suggested in sub-sub-subsection "Sendmail", of sub-subsection
+"Setting mail server parameters in config.php", seemed a simple,
+unedited copy of the parameters SMTP and /not/ by Sendmail nor Qmail.
+
 #+CAPTION: [[file:roles_t/core/tasks/main.yml][=roles_t/core/tasks/main.yml=]]
 #+BEGIN_SRC conf :tangle roles_t/core/tasks/main.yml
 
-- name: Configure Nextcloud phone region.
+- name: Configure Nextcloud settings.
   become: yes
   lineinfile:
     path: /var/www/nextcloud/config/config.php
-    regexp: "^ *'default_phone_region' *=> *'.*', *$"
-    line: "  'default_phone_region' => '{{ nextcloud_region }}',"
     insertbefore: "^[)];"
     firstmatch: yes
+  loop:
+  - regexp: "^ *'default_phone_region' *=> *'.*', *$"
+    line: "  'default_phone_region' => '{{ nextcloud_phone_reg }}',"
+
+  - regexp: "^ *'maintenance_window_start' *=> "
+    line: "  'maintenance_window_start' => 9,"
+
+  - regexp: "^ *'mail_smtpmode' *=>"
+    line: "  'mail_smtpmode' => 'sendmail',"
+  - regexp: "^ *'mail_sendmailmode' *=>"
+  - line: "  'mail_sendmailmode' => 'pipe',"
+  - regexp: "^ *'mail_from_address' *=>"
+  - line: "  'mail_from_address' => 'webmaster',"
+  - regexp: "^ *'mail_domain' *=>"
+  - line: "^ *'mail_domain' => 'core.small.private',"
   when: nextcloud.stat.exists
 #+END_SRC
 
@@ -7278,7 +7302,7 @@ sudo apt install wireguard systemd-resolved unattended-upgrades \
                 dovecot-imapd fetchmail rsync gnupg \
                 mariadb-server php php-{apcu,bcmath,curl,gd,gmp}\
                  php-{json,mysql,mbstring,intl,imagick,xml,zip} \
-                 libapache2-mod-php \
+                 imagemagick libapache2-mod-php \
                 nagios4 monitoring-plugins-basic lm-sensors \
                 nagios-nrpe-plugin
 #+END_SRC
index 53af72b1c8738f69fcc5d74812981b7b6751f4cd..8e3d80445eb0db53236551f855424ddfe57a016b 100755 (executable)
@@ -5,7 +5,7 @@ sudo apt install wireguard systemd-resolved unattended-upgrades \
                 dovecot-imapd fetchmail rsync gnupg \
                 mariadb-server php php-{apcu,bcmath,curl,gd,gmp}\
                  php-{json,mysql,mbstring,intl,imagick,xml,zip} \
-                 libapache2-mod-php \
+                 imagemagick libapache2-mod-php \
                 nagios4 monitoring-plugins-basic lm-sensors \
                 nagios-nrpe-plugin
 
index da8720486b8e9f6083efe14746884ea8536c02e4..65fb66e5c86c4f1adc6ffadd6d5c62b9f4e217d4 100644 (file)
     pkg: [ apache2, mariadb-server, php, php-apcu, php-bcmath,
            php-curl, php-gd, php-gmp, php-json, php-mysql,
            php-mbstring, php-intl, php-imagick, php-xml, php-zip,
-           libapache2-mod-php ]
+           imagemagick, libapache2-mod-php ]
 
 - name: Enable Apache2 modules for Nextcloud.
   become: yes
     line: "  'htaccess.RewriteBase' => '/nextcloud',"
   when: nextcloud.stat.exists
 
-- name: Configure Nextcloud phone region.
+- name: Configure Nextcloud settings.
   become: yes
   lineinfile:
     path: /var/www/nextcloud/config/config.php
-    regexp: "^ *'default_phone_region' *=> *'.*', *$"
-    line: "  'default_phone_region' => '{{ nextcloud_region }}',"
     insertbefore: "^[)];"
     firstmatch: yes
+  loop:
+  - regexp: "^ *'default_phone_region' *=> *'.*', *$"
+    line: "  'default_phone_region' => '{{ nextcloud_phone_reg }}',"
+
+  - regexp: "^ *'maintenance_window_start' *=> "
+    line: "  'maintenance_window_start' => 9,"
+
+  - regexp: "^ *'mail_smtpmode' *=>"
+    line: "  'mail_smtpmode' => 'sendmail',"
+  - regexp: "^ *'mail_sendmailmode' *=>"
+  - line: "  'mail_sendmailmode' => 'pipe',"
+  - regexp: "^ *'mail_from_address' *=>"
+  - line: "  'mail_from_address' => 'webmaster',"
+  - regexp: "^ *'mail_domain' *=>"
+  - line: "^ *'mail_domain' => 'core.small.private',"
   when: nextcloud.stat.exists
 
 - name: Create /Nextcloud/dbbackup.cnf.