From 39ee3768058ac5553dd35532eab0046c9620b2b1 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Fri, 9 Oct 2015 15:47:23 +0200
Subject: [PATCH] Extend sysadmin mailing tasks.

---
 jessie_start_server.sh            | 4 ++++
 mails/server_postinstall_finished | 2 +-
 mails/update_reminder             | 7 +++++++
 3 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 mails/update_reminder

diff --git a/jessie_start_server.sh b/jessie_start_server.sh
index 63dd4ad..d3af7fb 100755
--- a/jessie_start_server.sh
+++ b/jessie_start_server.sh
@@ -98,6 +98,10 @@ cp config/systemfiles/aliases /etc/aliases
 newaliases
 service postfix restart
 
+# Set up regular system update reminder.
+apt-get -y install cron
+su plom -c "echo '0 0 * * 0 ~/config/bin/simplemail.sh ~/config/mails/update_reminder' | crontab -"
+
 # Set up screen.
 apt-get -y install screen
 
diff --git a/mails/server_postinstall_finished b/mails/server_postinstall_finished
index 92131b4..45b82c1 100644
--- a/mails/server_postinstall_finished
+++ b/mails/server_postinstall_finished
@@ -1,4 +1,4 @@
-Server post-installation TODO
+[SYSADMIN] Server post-installation TODO
 
 The server post-installation script seems to have run successfully. Remember to
 perform the following tasks:
diff --git a/mails/update_reminder b/mails/update_reminder
new file mode 100644
index 0000000..81dd02c
--- /dev/null
+++ b/mails/update_reminder
@@ -0,0 +1,7 @@
+[SYSADMIN] System updating reminder
+
+This is your regular reminder to run:
+
+apt-get update
+apt-get upgrade
+apt-get dist-upgrade
-- 
2.30.2