standarize restart delays, check that exim is running on remote hosts
authorIan Kelling <ian@iankelling.org>
Wed, 16 Feb 2022 17:48:53 +0000 (12:48 -0500)
committerIan Kelling <ian@iankelling.org>
Wed, 16 Feb 2022 17:48:53 +0000 (12:48 -0500)
check-mailq
distro-end
mail-setup

index bd79f1d0cd3d7cc8edd8247fb2b42308d81e44ba..e84675de55e46d0a90f14a614d97979a674cac8b 100755 (executable)
@@ -7,6 +7,9 @@ if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi
 set -eE -o pipefail
 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 
+if ! systemctl is-active --quiet exim4; then
+  systemctl status exim4
+fi
 qlen=$(/usr/sbin/exiqgrep -o 60 -c -b | awk '{print $1}')
 if [[ $qlen != 0 ]]; then
   printf "%s" $qlen
index 67e7a4e009fe4b2718ea13d1743c66f130a290d8..8dba035c6f7a19b1349696b4ec587d21cf8ed452 100755 (executable)
@@ -583,7 +583,7 @@ StartLimitIntervalSec=0
 
 [Service]
 Restart=always
-RestartSec=60
+RestartSec=20
 EOF
   if $reload; then ser daemon-reload; fi
   sgo wg-quick@wghole
index 4325b7a79d7c8e4913bbb14afe55ce3106ba6bed..5c5ccae88509f5b3f27badec8d96c92eefb94bad 100755 (executable)
@@ -541,7 +541,7 @@ PrivateNetwork=true
 BindPaths=$bindpaths
 Restart=always
 # time to sleep before restarting a service
-RestartSec=1
+RestartSec=20
 
 [Install]
 WantedBy=multi-user.target
@@ -563,7 +563,7 @@ PrivateNetwork=true
 ExecStart=/usr/bin/flock -w 20 /tmp/newns.flock /a/bin/newns/newns -n 10.173.8 start mail
 ExecStop=/usr/bin/flock -w 20 /tmp/newns.flock /a/bin/newns/newns stop mail
 Restart=always
-RestartSec=10
+RestartSec=20
 
 
 [Install]
@@ -598,7 +598,7 @@ Type=simple
 ExecStart=/usr/local/bin/mailbindwatchdog $vpnser ${nn_progs[@]} unbound.service radicale.service
 Restart=always
 # time to sleep before restarting a service
-RestartSec=1
+RestartSec=10
 
 [Install]
 WantedBy=multi-user.target
@@ -675,7 +675,7 @@ PrivateNetwork=true
 BindPaths=$bindpaths
 
 Restart=always
-RestartSec=1
+RestartSec=20
 EOF
 
     # sooo, there are a few ways to get traffic from the mail network
@@ -726,7 +726,7 @@ PrivateNetwork=true
 BindPaths=$bindpaths
 
 Restart=always
-RestartSec=1
+RestartSec=20
 EOF
     done
     ;;
@@ -1277,7 +1277,7 @@ PrivateNetwork=true
 BindPaths=$bindpaths
 Restart=always
 # time to sleep before restarting a service
-RestartSec=1000
+RestartSec=20
 
 [Install]
 # for openvpn
@@ -2562,7 +2562,7 @@ StartLimitIntervalSec=0
 [Service]
 Restart=always
 # time to sleep before restarting a service
-RestartSec=1
+RestartSec=20
 EOF
 
     i /etc/default/exim4in <<'EOF'
@@ -2677,7 +2677,7 @@ StartLimitIntervalSec=0
 
 [Service]
 Restart=always
-RestartSec=300
+RestartSec=20
 EOF
 
     else