#!/bin/bash # Update postgres funtions GIT_DIR="/home/git_repo" /home/postgresStart.sh && git clone "https://deployment_ops:4rGdZ42sg4JaTt5uxMbp@bitbucket.org/srm-consulting/postgis_ddbb.git" $GIT_DIR cd $GIT_DIR && git checkout ${PGSQLM_BRANCH} cd "/home/git_repo/extensiones" && cp -r * /usr/local/pgsql/share/extension/ &&\ su -c "PGPASSFILE=/.pgpass /usr/local/pgsql/bin/psql -U ${PSQL_USER} -d postgres -c \"\i /usr/local/pgsql/check_ext.sql\"" ${PSQL_USER} &&\ tail -f /usr/local/pgsql/serverlog