Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hansson <daniel@techandme.se>2017-06-15 17:15:44 +0300
committerGitHub <noreply@github.com>2017-06-15 17:15:44 +0300
commit898f0354a2d79385709ce33f76fed29067b274b5 (patch)
tree756c35acd5de355a6f45a1736872770766ac31cd /lets-encrypt
parent8f1d88d21716baff6bab02901ff5fd4a1fdadbed (diff)
Set hostname in /etc/hosts (#269)
Diffstat (limited to 'lets-encrypt')
-rw-r--r--lets-encrypt/test-new-config.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/lets-encrypt/test-new-config.sh b/lets-encrypt/test-new-config.sh
index 43e96baf..d3e5cdff 100644
--- a/lets-encrypt/test-new-config.sh
+++ b/lets-encrypt/test-new-config.sh
@@ -36,6 +36,8 @@ then
echo "Setting hostname to $FQDOMAIN..."
sudo sh -c "echo 'ServerName $FQDOMAIN' >> /etc/apache2/apache2.conf"
sudo hostnamectl set-hostname "$FQDOMAIN"
+ # Change /etc/hosts as well
+ sed -i "s|127.0.1.1.*|127.0.1.1 $FQDOMAIN $(hostname -s)|g" /etc/hosts
fi
# Set trusted domains