From: Christian Heller Date: Thu, 8 Oct 2015 20:19:36 +0000 (+0200) Subject: Send TODO mail to user on server postinstall script finish. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/day_todos?a=commitdiff_plain;h=fc8842a26216cc5b7853c3638bebce6d43a6cf72;p=config Send TODO mail to user on server postinstall script finish. --- 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