switch to s6-rc
This commit is contained in:
parent
5103f5b01f
commit
05459d3577
16 changed files with 31 additions and 20 deletions
9
rootfs/bin/db-password
Executable file
9
rootfs/bin/db-password
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/command/with-contenv sh
|
||||
|
||||
echo "local all all trust" > "$PGDATA/pg_hba.conf"
|
||||
|
||||
pg_ctl -D "$PGDATA" -o "-c listen_addresses='localhost'" -w start
|
||||
|
||||
psql --command "ALTER USER postgres WITH PASSWORD '${POSTGRES_PASSWORD}';"
|
||||
|
||||
pg_ctl -D "$PGDATA" -o "-c listen_addresses='localhost'" -w stop
|
5
rootfs/bin/initdb
Executable file
5
rootfs/bin/initdb
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/command/with-contenv sh
|
||||
|
||||
if [ ! -f "/var/lib/postgresql/data/PG_VERSION" ]; then
|
||||
s6-setuidgid postgres initdb --username=postgres
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue