Skip to content

Commit 3432aee

Browse files
committed
chore: GRN_PLUGINS_DIR env var
1 parent 9ceb540 commit 3432aee

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ EOF
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
@@ -435,7 +435,7 @@ EOF
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"

nix/tools/run-client.sh.in

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff 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
106115
export POSTGRES_DB=postgres
107116
export POSTGRES_HOST=localhost
108117

109-
PORTNO="${2:-@PGSQL_DEFAULT_PORT@}"
110118
PGSQL_SUPERUSER=@PGSQL_SUPERUSER@
111119
MIGRATIONS_DIR=@MIGRATIONS_DIR@
112120
POSTGRESQL_SCHEMA_SQL=@POSTGRESQL_SCHEMA_SQL@

0 commit comments

Comments
 (0)