Skip to content

Commit 6ecc68e

Browse files
author
Daniel Hansson
authored
Don't set hostname
1 parent 141a67d commit 6ecc68e

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

wordpress-startup-script.sh

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -141,27 +141,6 @@ EOMSTART
141141
any_key "Press any key to start the script..."
142142
clear
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?
166145
if [[ "no" == $(ask_yes_or_no "Do you run this script on a *remote* VPS like DigitalOcean, HostGator or similar?") ]]
167146
then

0 commit comments

Comments
 (0)