diff options
Diffstat (limited to 'install/ishtar-install')
| -rwxr-xr-x | install/ishtar-install | 74 | 
1 files changed, 43 insertions, 31 deletions
diff --git a/install/ishtar-install b/install/ishtar-install index 8480fdd5d..1d26e1a7b 100755 --- a/install/ishtar-install +++ b/install/ishtar-install @@ -54,13 +54,11 @@ EOF  do_install() { -    cat >&2 <<-'EOF' - -******************************************************************************* -++++++                    Ishtar installation script                     ++++++ -******************************************************************************* - -EOF +    echo "" +    cecho g "*******************************************************************************" +    cecho g "++++++                      Ishtar installation script                   ++++++" +    cecho g "*******************************************************************************" +    echo ""      # check user      user="$(id -un 2>/dev/null || true)" @@ -185,7 +183,8 @@ EOF  EOF      while [ "$default_db" == '' ]      do -        read -p '* Default PostgreSQL host? [localhost] ' choice +        cecho y '* Default PostgreSQL host? [localhost] ' +        read choice          if [ "$choice" == '' ]; then              default_db='127.0.0.1'          elif [ "$choice" == 'localhost' ]; then @@ -207,7 +206,8 @@ EOF      MSG=""      while [ "$webserver" == '' ]      do -        read -p '* Which webserver do you want to use? ([nginx]/none) ' choice +        cecho y '* Which webserver do you want to use? ([nginx]/none) ' +        read choice          case "$choice" in              nginx ) webserver="nginx";;              none ) webserver="none";; @@ -226,7 +226,8 @@ EOF  EOF      while [ "$version" == '' ]      do -        read -p "* Which version would you like to use? ([develop]/master) " choice +        cecho y "* Which version would you like to use? ([develop]/master) " +        read choice          case "$choice" in              develop ) version="develop";;              master ) version="master";; @@ -254,7 +255,8 @@ EOF  EOF      while [ "$install_path" == '' ]      do -        read -p "* Which base install path for Ishtar? [/srv/] " choice +        cecho y "* Which base install path for Ishtar? [/srv/]" +        read choice          if [ -z "$choice" ]; then              install_path='/srv'          elif [ ! -d "$choice" ]; then @@ -274,7 +276,7 @@ EOF      fi      echo "" -    echo "*******************************************************************************" +    cecho g "*******************************************************************************"      echo ""      # Run setup for each distro accordingly @@ -287,43 +289,46 @@ EOF                  exit 1              fi +            echo "-------------------------------------------------------------------------------"; +            cecho y "Update debian packages cache"; +            echo "";              export DEBIAN_FRONTEND=noninteractive              ( set -x; $sh_c 'sleep 3; apt-get update' )              if ! command_exists git; then                  echo "-------------------------------------------------------------------------------"; -                echo "Installing git..."; +                cecho y "Installing git...";                  echo "";                  ( set -x; $sh_c 'sleep 3; apt-get install -y -q git' )              fi              if ! command_exists apg; then                  echo "-------------------------------------------------------------------------------"; -                echo "Installing apg..."; +                cecho y "Installing apg...";                  echo "";                  ( set -x; $sh_c 'sleep 3; apt-get install -y -q apg' )              fi              if ! command_exists pip; then                  echo "-------------------------------------------------------------------------------"; -                echo "Installing pip..."; +                cecho y "Installing pip...";                  echo "";                  ( set -x; $sh_c 'sleep 3; apt-get install -y -q python-pip' )              fi              if [ "$webserver" == 'nginx' ]; then                  echo "-------------------------------------------------------------------------------"; -                echo "Installing nginx and uwsgi..."; +                cecho y "Installing nginx and uwsgi...";                  echo "";                  ( set -x; $sh_c 'sleep 3; apt-get install -y -q  uwsgi uwsgi-plugin-python nginx' )              fi -            echo "-------------------------------------------------------------------------------"; -              if [ "$dist_version" == "wheezy" ]; then                  if [ "$default_db" == '127.0.0.1' ]; then +                    echo "-------------------------------------------------------------------------------"; +                    cecho y "Installing postgresql"                      POSTGIS=postgresql-9.1-postgis                      ( set -x; $sh_c 'sleep 3; apt-get install -y -q postgresql '$POSTGIS )                  fi                  echo "-------------------------------------------------------------------------------"; -                echo "Installing Ishtar dependencies" +                cecho y "Installing Ishtar dependencies"                  echo "";                  ( set -x; $sh_c 'sleep 3; apt-get install -y -q python python-django \            libjs-jquery libjs-jquery-ui python-pisa python-django-registration \ @@ -331,22 +336,23 @@ EOF            python-psycopg2 python-gdal gettext python-unicodecsv memcached \            python-tidylib python-django-extra-views python-memcache python-dbf' ) -                echo "Installing BeautifulSoup4" +                echo "-------------------------------------------------------------------------------"; +                cecho y "Installing BeautifulSoup4"                  echo "";                  ( set -x; $sh_c 'pip install BeautifulSoup4==4.3.2' )                  echo "-------------------------------------------------------------------------------"; -                echo "Installing django-simple-history" +                cecho y "Installing django-simple-history"                  echo "";                  ( set -x; $sh_c 'pip install git+https://github.com/treyhunner/django-simple-history.git@0fd9b8e9c6f36b0141367b502420efe92d4e21ce' ) -                echo "-------------------------------------------------------------------------------";              fi              if [ "$dist_version" == "jessie" ]; then                  if [ "$backports_activated" != 'true' ]; then                      echo "" -                    cecho p "  In order to install Ishtar you have to activate Debian backports. To do that:" +                    cecho r "  In order to install Ishtar you have to activate Debian backports." +                    echo "  To do that:"                      echo ""                      echo "    echo 'deb http://ftp.debian.org/debian jessie-backports main contrib non-free' >> /etc/apt/sources.list"                      echo "" @@ -355,10 +361,13 @@ EOF                  fi                  if [ "$default_db" == '127.0.0.1' ]; then +                    echo "-------------------------------------------------------------------------------"; +                    cecho y "Installing postgresql"                      POSTGIS=postgresql-9.4-postgis-2.3                      ( set -x; $sh_c 'sleep 3; apt-get install -y -q postgresql '$POSTGIS )                  fi -                echo "Installing Ishtar dependencies" +                echo "-------------------------------------------------------------------------------"; +                cecho y "Installing Ishtar dependencies"                  echo "";                  ( set -x; $sh_c 'sleep 3; apt-get install -t jessie-backports -y -q python python-django\                        python-django-registration' ) @@ -367,17 +376,17 @@ EOF                        python-tidylib python-lxml python-imaging python-html5lib\                        python-psycopg2 python-gdal gettext python-unicodecsv memcached \                        python-django-extra-views python-memcache python-dbf python-markdown' ) -                echo "Installing django-simple-history" +                echo "-------------------------------------------------------------------------------"; +                cecho y "Installing django-simple-history"                  echo "";                  ( set -x; $sh_c 'pip install git+https://github.com/treyhunner/django-simple-history.git@1.8.2#egg=django-simple-history' ) -                echo "-------------------------------------------------------------------------------";              fi              ;;      esac      echo "-------------------------------------------------------------------------------"; -    echo "Installing Ishtar sources" +    cecho y "Installing Ishtar sources"      echo "";      cd $install_path @@ -395,12 +404,15 @@ EOF      echo "ISHTAR_WEBSERVER="$webserver >> $etc_path"config"      echo "# settings added to all instances" >> $etc_path"extra_settings.py"      echo "" -    echo "*******************************************************************************"; +    cecho g "*******************************************************************************"      echo ""; -    cecho g "Installation done. Base configuration stored in "$etc_path"config file." -    cecho g "You can edit "$etc_path"extra_settings.py to add settings to all new instances."; +    cecho g "Installation done." +    cecho g "Base configuration stored in: "$etc_path"config" +    echo "" +    echo "You can edit "$etc_path"extra_settings.py to add Django settings to all new" +    echo "instances.";      echo ""; -    cecho g "Next you will have to create an instance with ishtar-prepare-instance script." +    cecho y "Next you will have to create an instance with: ishtar-prepare-instance"      echo "";  }  | 
