Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
20b0d16a
Commit
20b0d16a
authored
Apr 02, 2017
by
Igor Pecovnik
Browse files
Fixing FQDN
parent
51c7db5a
Changes
1
Show whitespace changes
Inline
Side-by-side
functions.sh
View file @
20b0d16a
...
...
@@ -174,8 +174,8 @@ set ${HOSTNAMEFQDN//./ }
HOSTNAMESHORT="
$1
"
cp /etc/hosts /etc/hosts.backup
cp /etc/hostname /etc/hostname.backup
sed -i '/#ispconfig/d' /etc/hosts
sed -e 's/127.0.0.1.*/
127.0.0.1 localhost.localdomain localhost
/g' -i
/etc/hosts
# create new
echo "
127
.0.0.1 localhost.localdomain localhost
" >
/etc/hosts
echo "
${
serverIP
}
${
HOSTNAMEFQDN
}
${
HOSTNAMESHORT
}
#ispconfig
" >> /etc/hosts
echo "
$HOSTNAMESHORT
" > /etc/hostname
/etc/init.d/hostname.sh start >/dev/null 2>&1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment