aboutsummaryrefslogtreecommitdiffstats
path: root/script/site-specific-install.sh
diff options
context:
space:
mode:
authorMark Longair <mhl@pobox.com>2013-12-10 12:18:08 +0000
committerMark Longair <mhl@pobox.com>2013-12-10 12:18:08 +0000
commit48edbae1b354cca43ef5b0df2c43c38395fae357 (patch)
tree2a66646d5c4f68e709e38d0e569909709c1866b5 /script/site-specific-install.sh
parent9eeed82744148cf5f889c8e584f541eb675bc05f (diff)
Rewrite myhostname in /etc/postfix/main.cf in the install script
This is necessary because the install script is also run on creating a new EC2 instance from the AMI in order to update the configuration with the new internal and external names; the hostname will be different in this case and otherwise myhostname wouldn't be rewritten.
Diffstat (limited to 'script/site-specific-install.sh')
-rwxr-xr-xscript/site-specific-install.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/script/site-specific-install.sh b/script/site-specific-install.sh
index 8917fd577..7d47a5990 100755
--- a/script/site-specific-install.sh
+++ b/script/site-specific-install.sh
@@ -66,6 +66,11 @@ ensure_line_present \
/etc/postfix/main.cf 644
ensure_line_present \
+ "^ *myhostname *=" \
+ "myhostname = $(hostname --fqdn)" \
+ /etc/postfix/main.cf 644
+
+ensure_line_present \
"^do-not-reply" \
"do-not-reply-to-this-address: :blackhole:" \
/etc/aliases 644