Browse Source

Fixed hostname issue in Debian

old-stable
gau1991 11 years ago
parent
commit
8e6ff9dfdf
  1. 5
      bin/install
  2. 5
      src/lib/ee_lib_check_fqdn.sh

5
bin/install

@ -90,6 +90,11 @@ function ee_lib_check_fqdn()
if [ "$EE_FQDN" != "" ];then
echo $EE_FQDN > /etc/hostname
if [ "$EE_LINUX_DISTRO" == "Debian" ];then
grep $EE_FQDN /etc/hosts &>> $EE_COMMAND_LOG
if [ $? -ne 0 ]; then
sed -i '1i\127.0.0.1 $EE_FQDN' /etc/hosts \
|| ee_lib_error "Unable setup hostname = " $?
fi
/etc/init.d/hostname.sh start &>> $EE_INSTALL_LOG
else
service hostname restart &>> $EE_INSTALL_LOG

5
src/lib/ee_lib_check_fqdn.sh

@ -7,6 +7,11 @@ function ee_lib_check_fqdn()
if [ "$EE_FQDN" != "" ];then
echo $EE_FQDN > /etc/hostname
if [ "$EE_LINUX_DISTRO" == "Debian" ];then
grep $EE_FQDN /etc/hosts &>> $EE_COMMAND_LOG
if [ $? -ne 0 ]; then
sed -i '1i\127.0.0.1 $EE_FQDN' /etc/hosts \
|| ee_lib_error "Unable setup hostname = " $?
fi
/etc/init.d/hostname.sh start &>> $EE_COMMAND_LOG
else
service hostname restart &>> $EE_COMMAND_LOG

Loading…
Cancel
Save