File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -141,27 +141,6 @@ EOMSTART
141141any_key " Press any key to start the script..."
142142clear
143143
144- # Set hostname and ServerName
145- echo " Setting hostname..."
146- FQN=$( host -TtA " $( hostname -s) " | grep " has address" | awk ' {print $1}' ) ; \
147- if [[ " $FQN " == " " ]]
148- then
149- FQN=$( hostname -s)
150- echo " Current hostname is: $FQN .localdomain"
151- fi
152- sudo sh -c " echo 'ServerName $FQN ' >> /etc/apache2/apache2.conf"
153- sudo hostnamectl set-hostname " $FQN "
154- service apache2 restart
155- cat << ETCHOSTS > "/etc/hosts"
156- 127.0.1.1 "$FQN .localdomain" "$FQN "
157- 127.0.0.1 localhost
158-
159- # The following lines are desirable for IPv6 capable hosts
160- ::1 localhost ip6-localhost ip6-loopback
161- ff02::1 ip6-allnodes
162- ff02::2 ip6-allrouters
163- ETCHOSTS
164-
165144# VPS?
166145if [[ " no" == $( ask_yes_or_no " Do you run this script on a *remote* VPS like DigitalOcean, HostGator or similar?" ) ]]
167146then
You can’t perform that action at this time.
0 commit comments