Updating shell scripts to adhear better to Bash style guides (#510)

* Updated Shell Script Format

Signed-off-by: Spencer <wf6DJd8a3xSSCZbn@protonmail.com>
This commit is contained in:
wf6DJd8a3xSSCZbn authored and GitHub committed 2021-01-08 16:45:00 +01:00
1 parent ad76445269
commit 6f8c34c0f3
6 files changed
+61 -61

No files matched your search

+5 -5
View File
@@ -5,7 +5,7 @@ export WAL_LEVEL=${WAL_LEVEL:-minimal}
export ARCHIVE_MODE=${ARCHIVE_MODE:-off}
export ARCHIVE_TIMEOUT=${ARCHIVE_TIMEOUT:-60}
function update_conf () {
function update_conf() {
wal=$1
# PGDATA is defined in upstream postgres dockerfile
config_file=$PGDATA/postgresql.conf
@@ -23,11 +23,11 @@ function update_conf () {
sed -i "s/archive_command =.*$//g" $config_file
# Configure wal-e
if [ "$wal" = true ] ; then
if [ "$wal" = true ]; then
/docker-entrypoint-initdb.d/setup-wale.sh
fi
echo "log_timezone = $DEFAULT_TIMEZONE" >> $config_file
echo "timezone = $DEFAULT_TIMEZONE" >> $config_file
echo "log_timezone = $DEFAULT_TIMEZONE" >>$config_file
echo "timezone = $DEFAULT_TIMEZONE" >>$config_file
}
if [ "${1:0:1}" = '-' ]; then
@@ -46,7 +46,7 @@ if [ "$1" = 'postgres' ]; then
done
# Setup wal-e env variables
if [ "$wal_enable" = true ] ; then
if [ "$wal_enable" = true ]; then
for v in ${VARS[@]}; do
export $v="${!v}"
done
+4 -4
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# wal-e specific configuration
echo "wal_level = $WAL_LEVEL" >> $PGDATA/postgresql.conf
echo "archive_mode = $ARCHIVE_MODE" >> $PGDATA/postgresql.conf
echo "archive_command = '/usr/bin/wal-e wal-push %p'" >> $PGDATA/postgresql.conf
echo "archive_timeout = $ARCHIVE_TIMEOUT" >> $PGDATA/postgresql.conf
echo "wal_level = $WAL_LEVEL" >>$PGDATA/postgresql.conf
echo "archive_mode = $ARCHIVE_MODE" >>$PGDATA/postgresql.conf
echo "archive_command = '/usr/bin/wal-e wal-push %p'" >>$PGDATA/postgresql.conf
echo "archive_timeout = $ARCHIVE_TIMEOUT" >>$PGDATA/postgresql.conf