X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=mail-setup;h=573078841cf8072127002fa4143d377e0077c061;hp=2f4a726b273604200501dcd817a680ff9030ae9b;hb=0cc08a73110c15c4e7bbb8c8233a6c122c27490e;hpb=917ca4a71b5c456b741456dc173c144ee7042d89 diff --git a/mail-setup b/mail-setup index 2f4a726..5730788 100755 --- a/mail-setup +++ b/mail-setup @@ -245,7 +245,7 @@ if postfix; then if command -v apt-get &> /dev/null; then debconf-set-selections < /etc/mailname + # MAIN_HARDCODE_PRIMARY_HOSTNAME might mess up the # smarthost config type, not sure. all other settings # would be unused in that config type. @@ -700,6 +703,19 @@ ssl_prefer_server_ciphers = yes EOF ####### end dovecot setup ######## + # https://selivan.github.io/2017/12/30/systemd-serice-always-restart.html + d=/etc/systemd/system/openvpn@mail + mkdir -p $d + cat >$d/override.conf <<'EOF' +[Service] +Restart=always +# time to sleep before restarting a service +RestartSec=1 + +[Unit] +# StartLimitIntervalSec in recent systemd versions +StartLimitInterval=0 +EOF systemctl enable offlineimapsync.timer systemctl start offlineimapsync.timer @@ -723,10 +739,13 @@ EOF debconf-set-selections < /etc/mailname fi # end $HOSTNAME != $MAIL_HOST