From fc8842a26216cc5b7853c3638bebce6d43a6cf72 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 8 Oct 2015 22:19:36 +0200 Subject: [PATCH] Send TODO mail to user on server postinstall script finish. --- bin/simplemail.sh | 9 +++++++++ jessie_start_server.sh | 3 +++ mails/server_postinstall_finished | 7 +++++++ 3 files changed, 19 insertions(+) create mode 100755 bin/simplemail.sh create mode 100644 mails/server_postinstall_finished diff --git a/bin/simplemail.sh b/bin/simplemail.sh new file mode 100755 index 0000000..6cbc552 --- /dev/null +++ b/bin/simplemail.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# +# This mails to user plom the message in the file named by the first parameter, +# decoded with the first line as subject and everything below the second line +# as the message body. The subject line MUST NOT contain '"' double quotes. + +subject=`head -1 $1` +body=`tail -n +2 $1` +echo $body | mutt -s "$subject" plom diff --git a/jessie_start_server.sh b/jessie_start_server.sh index 4a2e4af..7141a42 100755 --- a/jessie_start_server.sh +++ b/jessie_start_server.sh @@ -109,6 +109,9 @@ systemctl enable /etc/systemd/system/irssi.service # Clean up. rm jessie_start_server.sh +# Send instructions mail. +config/bin/simplemail.sh config/mails/server_postinstall_finished + # Set password for user. passwd plom diff --git a/mails/server_postinstall_finished b/mails/server_postinstall_finished new file mode 100644 index 0000000..5d318d9 --- /dev/null +++ b/mails/server_postinstall_finished @@ -0,0 +1,7 @@ +Server post-installation TODO + +The server post-installation script seems to have run successfully. Remember to +perform the following tasks: + +- once when mail system set-up seems stable, in + config/dotfiles_user_server/getmail/getmailrc, set [options] delete = true -- 2.30.2