Skip to content

Commit c420bb1

Browse files
committed
fix: syntax
1 parent 4e6292b commit c420bb1

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

ansible/tasks/setup-pgbouncer.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
comment: "PgBouncer user"
4949
groups: "postgres,ssl-cert"
5050
name: "pgbouncer"
51-
shell: "/usr/sbin/nolign"
51+
shell: "/usr/sbin/nologin"
5252
state: "present"
5353

5454
- name: Create PgBouncer directories if they do not exist
@@ -114,7 +114,6 @@
114114
- /etc/postgresql/pg_hba.conf
115115
- /etc/postgresql/pg_hba_users_public.conf
116116
- /etc/postgresql/pg_hba_public.conf
117-
- /etc/pgbouncer-custom/ssl-config.ini
118117
loop_control:
119118
loop_var: "pgbouncer_group_item"
120119

nix/checks.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
PGSODIUM_GETKEY = "${getkey-script}/bin/pgsodium-getkey";
107107
PGSQL_DEFAULT_PORT = pgPort;
108108
};
109+
version = majorVersion;
109110
};
110111

111112
getVersionArg =

nix/packages/lib.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
version,
1818
}:
1919
let
20-
paths = {
20+
basePaths = {
2121
migrationsDir = builtins.path {
2222
name = "migrations";
2323
path = ../../migrations/db;
@@ -67,7 +67,7 @@
6767
path = ../tests/util/pgsodium_getkey.sh;
6868
};
6969
};
70-
// (
70+
extraPaths =
7171
if version == "15" then
7272
{
7373
pgHbaConfigFile = builtins.path {
@@ -89,8 +89,8 @@
8989
name = "pg_hba_public.conf";
9090
path = ../../ansible/files/postgresql_config/pg_hba_public.conf.j2;
9191
};
92-
}
93-
);
92+
};
93+
paths = basePaths // extraPaths;
9494

9595
localeArchive =
9696
if pkgs.stdenv.isDarwin then

nix/tools/run-server.sh.in

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ start_postgres() {
3434
# Start the server
3535
pg_ctl start -D "$DATDIR" -l "$LOG_FILE" \
3636
-o "--config-file=$DATDIR/postgresql.conf -p $PORTNO -k $DATDIR/tmp"
37-
37+
3838
# Give it a moment to write logs
3939
sleep 1
40-
40+
4141
# Check server status and logs
4242
if ! pg_ctl status -D "$DATDIR"; then
4343
echo "PostgreSQL failed to start. Full logs:"
@@ -192,7 +192,7 @@ export LC_CTYPE=en_US.UTF-8
192192
export KEY_FILE="$DATDIR/pgsodium.key"
193193
echo "KEY_FILE: $KEY_FILE"
194194
echo "KEY_FILE contents:"
195-
cat "$KEY_FILE"
195+
cat "$KEY_FILE"
196196

197197
echo "PGSODIUM_GETKEY_SCRIPT: $PGSODIUM_GETKEY_SCRIPT"
198198
echo "NOTE: using port $PORTNO for server"
@@ -218,7 +218,7 @@ if [ "$VERSION" = "15" ]; then
218218
else
219219
cp "${PG_HBA_FILE}" "$DATDIR/pg_hba.conf"
220220
# copy extra hba_*.conf files over
221-
extra_hba_files=( ${PG_HBA_FILE%pg_hba.conf}pg_hba*.conf* )
221+
extra_hba_files=( ${PG_HBA_FILE%pg_hba.conf}pg_hba_*.conf* )
222222
for f in "${extra_hba_files[@]}"; do
223223
base=$(basename "$f")
224224
cp "$f" "$DATDIR/${base%%.conf*}.conf"
@@ -275,16 +275,16 @@ orioledb_config_items() {
275275
# macOS specific configuration
276276
echo "macOS detected, applying macOS specific configuration"
277277
ls -la "$DATDIR"
278-
278+
279279
# Use perl instead of sed for macOS
280280
perl -pi -e 's/ timescaledb,//g' "$DATDIR/postgresql.conf"
281281
perl -pi -e 's/db_user_namespace = off/#db_user_namespace = off/g' "$DATDIR/postgresql.conf"
282-
282+
283283
perl -pi -e 's/ timescaledb,//g' "$DATDIR/supautils.conf"
284284
perl -pi -e 's/ plv8,//g' "$DATDIR/supautils.conf"
285285
perl -pi -e 's/ pgjwt,//g' "$DATDIR/supautils.conf"
286286
perl -pi -e 's/(shared_preload_libraries\s*=\s*'\''.*?)'\''/\1, orioledb'\''/' "$DATDIR/postgresql.conf"
287-
287+
288288
echo "default_table_access_method = 'orioledb'" >> "$DATDIR/postgresql.conf"
289289
# OrioleDB rewind configuration (20 minute window, 10MB buffer)
290290
echo "orioledb.enable_rewind = true" >> "$DATDIR/postgresql.conf"
@@ -317,7 +317,7 @@ export GRN_PLUGINS_DIR=$GROONGA/lib/groonga/plugins
317317

318318
# Start postgres
319319
mkdir -p "$DATDIR/tmp"
320-
chmod 1777 "$DATDIR/tmp"
320+
chmod 1777 "$DATDIR/tmp"
321321
start_postgres "daemon"
322322

323323
# Wait for PostgreSQL to start
@@ -397,6 +397,6 @@ stop_postgres
397397
# Step 4: Restart PostgreSQL in the foreground (with log output visible) or as a daemon
398398
if [ "$DAEMONIZE" = true ]; then
399399
start_postgres "daemon"
400-
else
400+
else
401401
start_postgres "foreground"
402402
fi

0 commit comments

Comments
 (0)