Update 'installer.sh'

This commit is contained in:
bprieshof
2019-03-20 12:23:02 +01:00
parent 7c4f31c648
commit 4ba57fddc5

View File

@@ -15,6 +15,9 @@
echo "Ubuntu 18.04 installatie script."
echo "Domein zonder www:"
read domain
echo 'Hostname (eg: VCH001) zonder ".ictmaatwerk-cs.nl":'
read hostname
hostname=$hostname".ictmaatwerk-cs.nl"
while true; do
read -p "bestaat www.${domain} in DNS -> yes/no?" yn
case $yn in
@@ -171,7 +174,7 @@ apt dist-upgrade -y
apt install -y rsync grsync sshpass
apt clean
apt autoremove -y
hostnamectl set-hostname $domain
hostnamectl set-hostname $hostname
sed -i 's/;preserve_hostname: false/preserve_hostname: true/g' /etc/cloud/cloud.cfg
timedatectl set-timezone Europe/Amsterdam
if free | awk '/^Swap:/ {exit !$2}'; then