Commit 20b0d16a authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Fixing FQDN

parent 51c7db5a
...@@ -174,8 +174,8 @@ set ${HOSTNAMEFQDN//./ } ...@@ -174,8 +174,8 @@ set ${HOSTNAMEFQDN//./ }
HOSTNAMESHORT="$1" HOSTNAMESHORT="$1"
cp /etc/hosts /etc/hosts.backup cp /etc/hosts /etc/hosts.backup
cp /etc/hostname /etc/hostname.backup cp /etc/hostname /etc/hostname.backup
sed -i '/#ispconfig/d' /etc/hosts # create new
sed -e 's/127.0.0.1.*/127.0.0.1 localhost.localdomain localhost/g' -i /etc/hosts echo "127.0.0.1 localhost.localdomain localhost" > /etc/hosts
echo "${serverIP} ${HOSTNAMEFQDN} ${HOSTNAMESHORT} #ispconfig " >> /etc/hosts echo "${serverIP} ${HOSTNAMEFQDN} ${HOSTNAMESHORT} #ispconfig " >> /etc/hosts
echo "$HOSTNAMESHORT" > /etc/hostname echo "$HOSTNAMESHORT" > /etc/hostname
/etc/init.d/hostname.sh start >/dev/null 2>&1 /etc/init.d/hostname.sh start >/dev/null 2>&1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment