diff options
| -rwxr-xr-x | install/ishtar-prepare-instance | 21 | 
1 files changed, 5 insertions, 16 deletions
| diff --git a/install/ishtar-prepare-instance b/install/ishtar-prepare-instance index 55c66df33..c670cb6c7 100755 --- a/install/ishtar-prepare-instance +++ b/install/ishtar-prepare-instance @@ -210,25 +210,14 @@ EOF      fi      # dnsmasq -    echo "* adding domain to local dnsmasq entry" -    echo "address=/"$URL"/127.0.0.1" >> /etc/dnsmasq.d/ishtar -    systemctl restart dnsmasq +    if [ -f /etc/dnsmasq.d/ ]; then +      echo "* adding domain to local dnsmasq entry" +      echo "address=/"$URL"/127.0.0.1" >> /etc/dnsmasq.d/ishtar +      systemctl restart dnsmasq +    fi      export PG_VERSION DB_HOST DB_PORT DB_PASSWORD DB_NAME POSTGIS_VERSION      su postgres <<'EOF' -      echo " * Checking template_postgis" -      if ! psql -l | grep -qs template_postgis; then -        echo "   - not present, creating" -        createdb -E UTF8 template_postgis -        psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis'" -        psql -q -d template_postgis -f /usr/share/postgresql/$PG_VERSION/extension/postgis--$POSTGIS_VERSION.sql -        psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" -        psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;" -        psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" -      else -        echo "   - already present" -      fi -        echo " * Checking database $DB_NAME"        if ! psql -l | grep -qs "$DB_NAME"; then          echo "   - not present, creating" | 
