diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-01-31 16:22:30 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-07-01 18:02:28 +0200 | 
| commit | ceb65586300bca1af506976b6aa2f84d58861a65 (patch) | |
| tree | 5c2184484cb02a7bfae8ac1df16d8b3bc5590c89 | |
| parent | 8ee90c1fccdf246a1d9e37b30097ef54e0f53b38 (diff) | |
| download | Ishtar-ceb65586300bca1af506976b6aa2f84d58861a65.tar.bz2 Ishtar-ceb65586300bca1af506976b6aa2f84d58861a65.zip | |
ishtar-prepare-instance: simplify for pg11 - condition on dnsmasq
| -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" | 
