From f0cea1b1143535099038338b77ea778067da4fe5 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Tue, 9 Sep 2014 15:21:22 +0530 Subject: [PATCH] Fixes #306 --- bin/easyengine | 3 +++ bin/install | 29 ----------------------------- bin/update | 3 --- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/bin/easyengine b/bin/easyengine index a8d2a05e..00dd3ed6 100644 --- a/bin/easyengine +++ b/bin/easyengine @@ -148,6 +148,9 @@ elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ]; then ee_lib_error "Found installed Dovecot Packages server, exit status=" 1 fi + # Make hostname as FQDN + ee_lib_check_fqdn $(hostname -f) + # Install Dovecot ee_mod_install_dovecot diff --git a/bin/install b/bin/install index 24efda35..4e83a263 100644 --- a/bin/install +++ b/bin/install @@ -82,32 +82,6 @@ function ee_lib_package_check() done } -# Check hostname is FQDN or not. If not set it -function ee_lib_check_fqdn() -{ - case $1 in - *.*) - if [ "$EE_FQDN" != "" ];then - echo $EE_FQDN > /etc/hostname - if [ "$EE_LINUX_DISTRO" == "Debian" ];then - grep $EE_FQDN /etc/hosts &>> $EE_INSTALL_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 - fi - echo "hostname = $(hostname -f)" &>> $EE_INSTALL_LOG - fi - ;; - *) - read -p "Enter hostname [FQDN]: " EE_FQDN - ee_lib_check_fqdn $EE_FQDN - ;; - esac -} # Pre checks to avoid later screw ups # Checking EasyEngine (ee) log directory @@ -211,9 +185,6 @@ fi cp -a /tmp/easyengine/docs/man/ee.8 /usr/share/man/man8/ &>> $EE_INSTALL_LOG \ || ee_lib_error "Unable to copy EasyEngine (ee) man page, exit status = " $? -# Make hostname as FQDN -ee_lib_check_fqdn $(hostname -f) - # Git config settings GIT_USER_NAME=$(git config user.name) GIT_USER_EMAIL=$(git config user.email) diff --git a/bin/update b/bin/update index 278eeb20..0dd1eccc 100644 --- a/bin/update +++ b/bin/update @@ -395,9 +395,6 @@ if [[ $EE_CURRENT_VERSION < $EE_LATEST_VERSION ]]; then done fi - # Make hostname as FQDN - ee_lib_check_fqdn $(hostname -f) - if [[ $EE_CURRENT_VERSION = 2.0.0 ]]; then dpkg --get-selections | grep -v deinstall | grep php5-fpm &>> $EE_UPDATE_LOG if [ $? -eq 0 ]; then