aboutsummaryrefslogtreecommitdiff
path: root/tw/services/nextcloud.scm
diff options
context:
space:
mode:
authorTimo Wilken2024-08-25 19:11:54 +0200
committerTimo Wilken2024-08-25 19:11:54 +0200
commite862b7a5b28de96c426b2c105718519caf204039 (patch)
tree49afb888c1ffdc5bea3ef2822475090736c53661 /tw/services/nextcloud.scm
parent161dc84fce2c2de603d0b867d07e9a412897e51c (diff)
Send mail output for some mcron jobs
For mcron jobs that only output text when they fail, mail that output.
Diffstat (limited to 'tw/services/nextcloud.scm')
-rw-r--r--tw/services/nextcloud.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/tw/services/nextcloud.scm b/tw/services/nextcloud.scm
index 177af535..f4170a31 100644
--- a/tw/services/nextcloud.scm
+++ b/tw/services/nextcloud.scm
@@ -311,12 +311,13 @@ opcache.revalidate_freq=120
;; Nextcloud cron
(simple-service 'nextcloud-cron mcron-service-type
(list #~(job "*/5 * * * *"
- #$(program-file "nextcloud-cron-command"
- #~(begin
- ;; Nextcloud News needs this to fetch HTTPS feeds.
- (setenv "SSL_CERT_DIR" #$(file-append nss-certs "/etc/ssl/certs"))
- (execl #$(file-append php "/bin/php") "php"
- "-c" #$%nextcloud-php.ini "/var/www/nextcloud/cron.php")))
+ (with-mail-out
+ #$(program-file "nextcloud-cron-command"
+ #~(begin
+ ;; Nextcloud News needs this to fetch HTTPS feeds.
+ (setenv "SSL_CERT_DIR" #$(file-append nss-certs "/etc/ssl/certs"))
+ (execl #$(file-append php "/bin/php") "php"
+ "-c" #$%nextcloud-php.ini "/var/www/nextcloud/cron.php"))))
#:user "php-fpm")
;; TODO: try `with-mail-out' from `(mcron redirect)'?