File: postgis.sh

package info (click to toggle)
gdal 3.6.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 89,664 kB
  • sloc: cpp: 1,136,033; ansic: 197,355; python: 35,910; java: 5,511; xml: 4,011; sh: 3,950; cs: 2,443; yacc: 1,047; makefile: 288
file content (12 lines) | stat: -rwxr-xr-x 364 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# abort install if any errors occur and enable tracing
set -o errexit
set -o xtrace

sudo sed -i  's/md5/trust/' /etc/postgresql/14/main/pg_hba.conf
sudo sed -i  's/peer/trust/' /etc/postgresql/14/main/pg_hba.conf

sudo service postgresql restart
psql -c "create database autotest" -U postgres
psql -c "create extension postgis" -d autotest -U postgres