summaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
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
commita91bda41726d5214c0f2fb4f1c988968e0654105 (patch)
tree5c2184484cb02a7bfae8ac1df16d8b3bc5590c89 /install
parent44e060b5922e77831b7f875011e8f6adb6032ae3 (diff)
downloadIshtar-a91bda41726d5214c0f2fb4f1c988968e0654105.tar.bz2
Ishtar-a91bda41726d5214c0f2fb4f1c988968e0654105.zip
ishtar-prepare-instance: simplify for pg11 - condition on dnsmasq
Diffstat (limited to 'install')
-rwxr-xr-xinstall/ishtar-prepare-instance21
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"