File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 419419 if [ " $IS_NIX_BASED_SYSTEM " = " true" ]; then
420420 UPGRADE_COMMAND=" . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && $UPGRADE_COMMAND "
421421 fi
422- LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -pc " $UPGRADE_COMMAND --check" -s " $SHELL " postgres
422+ GRN_PLUGINS_DIR=/var/lib/postgresql/.nix-profile/lib/groonga/plugins LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -pc " $UPGRADE_COMMAND --check" -s " $SHELL " postgres
423423
424424 echo " 10. Stopping postgres; running pg_upgrade"
425425 # Extra work to ensure postgres is actually stopped
435435 CI_stop_postgres
436436 fi
437437
438- LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -pc " $UPGRADE_COMMAND " -s " $SHELL " postgres
438+ GRN_PLUGINS_DIR=/var/lib/postgresql/.nix-profile/lib/groonga/plugins LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -pc " $UPGRADE_COMMAND " -s " $SHELL " postgres
439439
440440 # copying custom configurations
441441 echo " 11. Copying custom configurations"
Original file line number Diff line number Diff line change @@ -64,6 +64,15 @@ while [[ "$#" -gt 0 ]]; do
6464 exit 1
6565 fi
6666 ;;
67+ -p|--port)
68+ if [[ -n " $2 " && ! " $2 " =~ ^- ]]; then
69+ PORTNO=" $2 "
70+ shift 2
71+ else
72+ echo " Error: --port requires an argument"
73+ exit 1
74+ fi
75+ ;;
6776 -h|--help)
6877 print_help
6978 exit 0
@@ -106,7 +115,6 @@ export PATH=$BINDIR/bin:$PATH
106115export POSTGRES_DB=postgres
107116export POSTGRES_HOST=localhost
108117
109- PORTNO=" ${2:-@ PGSQL_DEFAULT_PORT@ } "
110118PGSQL_SUPERUSER=@PGSQL_SUPERUSER@
111119MIGRATIONS_DIR=@MIGRATIONS_DIR@
112120POSTGRESQL_SCHEMA_SQL=@POSTGRESQL_SCHEMA_SQL@
You can’t perform that action at this time.
0 commit comments