Skip to content

Commit

Permalink
Add a function to install-site to create a postgres utf8 template
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Day committed Aug 14, 2015
1 parent f7dca60 commit a9f5d1b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bin/install-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,16 @@ install_postgis() {
fi
}

# Create a postgres template called template_utf8 that uses UTF-8 encoding
create_postgres_template_utf8() {
echo "Creating template_utf8 database template... "
sudo -u postgres createdb -T template0 -E UTF-8 template_utf8
sudo -u postgres psql <<EOF
update pg_database set datistemplate=true, datallowconn=false where datname='template_utf8';
EOF
echo $DONE_MSG
}

make_log_directory() {
LOG_DIRECTORY="$DIRECTORY/logs"
mkdir -p "$LOG_DIRECTORY"
Expand Down

0 comments on commit a9f5d1b

Please sign in to comment.