[Bug] Seafile Server Installer script quits unexpectedly if hostname = localhost.localdomain

The Seafile Server Installer script, found at https://github.com/haiwen/seafile-server-installer/, quits unexpectedly if hostname = localhost.localdomain on CentOS7 Minimal. I say unexpectedly because it is supposed to generate a log on success or fail but it doesn’t generate a log at all.

The fix is simple. Just don’t use a hostname that is localhost.localdomain.

You can change it with hostname seafile.

If someone has access to the repo, can you add a check before the script is executed?

# -------------------------------------------
      
      
        # Ensure we are running the installer as root
      
      
        # -------------------------------------------
      
      
        if [[ $EUID -ne 0 ]]; then
      
      
          echo "  Aborting because you are not root" ; exit 1
      
      
        fi
      
      
        

      
      
        

      
      
        # -------------------------------------------
      
      
        # Abort if directory /opt/seafile/ exists
      
      
        # -------------------------------------------
      
      
        if [[ -d "/opt/seafile/" ]] ;
      
      
        then
      
      
          echo "  Aborting because directory /opt/seafile/ already exist" ; exit 1
      
      
        fi
      
      
        

      
      
        # -------------------------------------------
      
      
        # Abort if seafile user exists
      
      
        # -------------------------------------------
      
      
        if getent passwd ${SEAFILE_SERVER_USER} > /dev/null 2>&1 ;
      
      
        then
      
      
          echo "Aborting because user ${SEAFILE_SERVER_USER} already exist" ; exit 1
      
      
        fi
      
      
        
<< Insert check here
      
      
        

      
      
        # -------------------------------------------
      
      
        # Setup permissive selinux
      
      
        # -------------------------------------------

Also, aborting the script by pressing 3 when asked to pick community or pro editions or exit does not work and instead installs the community edition. You have to press ctrl+c to stop the installation.

Maybe localhost.localdomain is not defined. I’m running Debian and I don’t have a localhost.localdomain entry in my /etc/hosts. Only localhost is defined. Try using “localhost” or “127.0.0.1” to see if it has the same behavior.

I am using CentOS 7 Minimal, as mentioned in the original post. localhost.localdomain is the default hostname for CentOS 7 Minimal. I’ve reinstalled CentOS 7 Minimal more times that I can count just getting SeaFile server to work properly with the installer script. So much unnecessary headaches in the past 4 days. I hate windows support was dropped. I run virtual machines for other stuff and cannot run the docker version because docker conflicts with virtualbox and other hypervisors.