Browse Source

Added FQDN check

bugfixes
gau1991 10 years ago
parent
commit
067f5ddcf7
  1. 19
      bin/install
  2. 3
      bin/update
  3. 18
      src/lib/ee_lib_check_fqdn.sh

19
bin/install

@ -81,6 +81,23 @@ 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
service hostname restart &>> $EE_INSTALL_LOG
hostname -f &>> $EE_INSTALL_LOG
fi
;;
*)
read -p "Enter FQDN to set for Hostname: " EE_FQDN
ee_lib_check_fqdn $EE_FQDN
;;
esac
}
# Pre checks to avoid later screw ups
# Checking EasyEngine (ee) log directory
@ -184,6 +201,8 @@ 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)

3
bin/update

@ -395,6 +395,9 @@ 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

18
src/lib/ee_lib_check_fqdn.sh

@ -0,0 +1,18 @@
# Check Server hostname is FQDN or not
function ee_lib_check_fqdn()
{
case $1 in
*.*)
if [ $EE_FQDN != "" ];then
echo $EE_FQDN > /etc/hostname
service hostname restart &>> $EE_COMMAND_LOG
hostname -f &>> $EE_COMMAND_LOG
fi
;;
*)
read -p "Enter FQDN to set for Hostname: " EE_FQDN
ee_lib_check_fqdn $EE_FQDN
;;
esac
}
Loading…
Cancel
Save