forked from sverhoeven/docker-cartodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template_postgis.sh
executable file
·18 lines (17 loc) · 778 Bytes
/
template_postgis.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
#
# Init script for template postgis
#
POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib/postgis-2.2;
createdb -E UTF8 template_postgis;
createlang -d template_postgis plpgsql;
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' \
WHERE datname='template_postgis'"
psql -d template_postgis -c "CREATE EXTENSION postgis;"
psql -d template_postgis -c "CREATE EXTENSION postgis_topology;"
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;"
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"
psql -c "CREATE EXTENSION plpythonu;"
psql -d template_postgis -c "CREATE EXTENSION plpythonu;"
psql -d template_postgis -c "CREATE EXTENSION crankshaft VERSION 'dev';"
psql -d template_postgis -c "CREATE EXTENSION plproxy;"