From b889300e008756ac4c5cde6656b6fea0048325a4 Mon Sep 17 00:00:00 2001
From: Matthew Saunders Brown <msb@stackaas.com>
Date: Mon, 28 Mar 2022 09:45:38 -0700
Subject: [PATCH] cleaned up systemd timer

---
 install.sh                 | 2 +-
 systemd/vmail-cron.service | 3 ---
 systemd/vmail-cron.timer   | 2 +-
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/install.sh b/install.sh
index af7db03..8370045 100755
--- a/install.sh
+++ b/install.sh
@@ -157,7 +157,7 @@ cp sbin/vmail-cron.sh /usr/local/sbin/
 chmod 755 /usr/local/sbin/vmail-cron.sh
 cp systemd/vmail-cron.* /usr/lib/systemd/system/
 chmod 644 /usr/lib/systemd/system/vmail-cron.*
-systemctl daemon-reload
+systemctl enable vmail-cron.timer
 systemctl start vmail-cron.timer
 
 # download and install roundcubemail
diff --git a/systemd/vmail-cron.service b/systemd/vmail-cron.service
index 19a8d03..403835c 100644
--- a/systemd/vmail-cron.service
+++ b/systemd/vmail-cron.service
@@ -8,6 +8,3 @@ Description=vmail-stack cron
 [Service]
 Type=simple
 ExecStart=/usr/local/sbin/vmail-cron.sh
-
-[Install]
-WantedBy=multi-user.target
diff --git a/systemd/vmail-cron.timer b/systemd/vmail-cron.timer
index 91414fe..0deb5b0 100644
--- a/systemd/vmail-cron.timer
+++ b/systemd/vmail-cron.timer
@@ -11,4 +11,4 @@ Unit=vmail-cron.service
 AccuracySec=6h
 
 [Install]
-WantedBy=multi-user.target
+WantedBy=timers.target