Quote shell variables in configure-tde-server.sh

pull/209/head
Andreas Karlsson 7 months ago committed by Andreas Karlsson
parent 43f4804ba5
commit a3fde4e52d
  1. 18
      ci_scripts/configure-tde-server.sh

@ -11,7 +11,7 @@ export PATH=$INSTALL_DIR/bin:$PATH
export PGDATA=$INSTALL_DIR/data
if pgrep -x "postgres" > /dev/null; then
pg_ctl -D $PGDATA stop
pg_ctl -D "$PGDATA" stop
fi
if pgrep -x "postgres" > /dev/null; then
@ -19,19 +19,19 @@ if pgrep -x "postgres" > /dev/null; then
exit 1
fi
if [ -d $PGDATA ]; then
rm -rf $PGDATA
if [ -d "$PGDATA" ]; then
rm -rf "$PGDATA"
fi
initdb -D $PGDATA
initdb -D "$PGDATA"
echo "shared_preload_libraries ='pg_tde'" >> $PGDATA/postgresql.conf
echo "shared_preload_libraries ='pg_tde'" >> "$PGDATA/postgresql.conf"
pg_ctl -D $PGDATA start
pg_ctl -D "$PGDATA" start
createdb setup_helper
psql setup_helper < $SCRIPT_DIR/tde_setup_global.sql
psql setup_helper < "$SCRIPT_DIR/tde_setup_global.sql"
echo "pg_tde.wal_encrypt = on" >> $PGDATA/postgresql.conf
echo "pg_tde.wal_encrypt = on" >> "$PGDATA/postgresql.conf"
pg_ctl -D $PGDATA restart
pg_ctl -D "$PGDATA" restart

Loading…
Cancel
Save