lots of updates, some t11 stuff
[distro-setup] / mail-setup
index 5d184932481fdbafee2d9c5e63be3584446df8dc..3b281990b11943e0167bd0556db7e153cba0671a 100755 (executable)
@@ -1507,7 +1507,7 @@ EOF
   # disable power management feature, set to 240 min sync interval,
   # so it shouldn't be bad.
 
-  # davdroid from f-druid.
+  # davx^5 from f-droid
   # login with url and user name
   # url https://cal.iankelling.org/ian
   # username ian
@@ -2316,10 +2316,12 @@ source /usr/local/lib/err
 
 m() { printf "%s\n" "$*";  "$@"; }
 err-cleanup() {
-echo failed nextcloud update for $ncbase >&2
-  /sbin/exim -t <<EOF
+  echo failed nextcloud update for $ncbase >&2
+  # -odf or else systemd will kill the background delivery process
+  # and the message will sit in the queue until the next queue run.
+  exim -odf -t <<EOF
 To: alerts@iankelling.org
-From: root@$(hostname -f)
+From: www-data@$(hostname -f)
 Subject: failed nextcloud update for $ncbase
 
 For logs, run: jr -u $ncbase
@@ -2337,10 +2339,11 @@ if [[ ! $1 ]]; then
 fi
 
 ncbase=$1
-echo running: php /var/www/$ncbase/updater/updater.phar -n
-m php /var/www/$ncbase/updater/updater.phar -n
 cd /var/www/$ncbase
-m running php occ -n upgrade
+m php /var/www/$ncbase/updater/updater.phar -n
+# just being overly cautious
+sleep 3
+m php occ -n upgrade
 EOFOUTER
     chmod +x /usr/local/bin/ncup
 
@@ -3324,7 +3327,7 @@ EOF
       esac
 
       cat >>/usr/local/bin/send-test-forward <<EOFOUTER
-/usr/sbin/exim -f $test_from -t <<EOF
+/usr/sbin/exim -odf -f $test_from -t <<EOF
 From: $test_from
 To: $test_to
 Subject: test \$(date +%Y-%m-%dT%H:%M:%S%z) \$EPOCHSECONDS