Commit 719e9b2 1 parent 98c3498 commit 719e9b2 Copy full SHA for 719e9b2
File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export PGDATANEW=/pg_new/data
21
21
export PGUSER=" ${PGUSER} "
22
22
23
23
if [ " $# " -eq 0 -o " ${1: 0: 1} " = ' -' ]; then
24
- set -- pg_upgrade " $@ "
24
+ set -- pg_upgrade
25
25
fi
26
26
27
27
if [ " $( id -u) " = ' 0' ] ; then
@@ -65,9 +65,12 @@ eval "${PGBINOLD}/pg_ctl -D ${PGDATAOLD} -l logfile stop"
65
65
[ -z " ${LOCALE} " ] && LOCALE=" en_US.utf8"
66
66
eval " ${PGBINNEW} /initdb --username=${PGUSER} --pgdata=${PGDATANEW} --encoding=${ENCODING} --lc-collate=${LOCALE} --lc-ctype=${LOCALE} "
67
67
68
+ # run pg_upgrade or launch CMD
68
69
if [ " $1 " = ' pg_upgrade' ] ; then
69
70
# Upgrade DB PG_OLD into PG_NEW
70
71
eval " /usr/lib/postgresql/${PG_NEW} /bin/pg_upgrade"
72
+ else
73
+ exec " $@ "
71
74
fi
72
75
73
76
# # Update pg config listen_address
79
82
# host all all 172.17.0.0/16 trust
80
83
# EOF
81
84
# chown postgres:postgres ${PGDATANEW}/pg_hba.conf
82
-
83
- if [ " $1 " != ' pg_upgrade' ] ; then
84
- exec " $@ "
85
- fi
You can’t perform that action at this time.
0 commit comments