initial commit of file from CVS for smeserver-postgresql on Sat Sep 7 20:54:55 AEST 2024
This commit is contained in:
13
root/sbin/e-smith/systemd/postgresql-initialize
Normal file
13
root/sbin/e-smith/systemd/postgresql-initialize
Normal file
@@ -0,0 +1,13 @@
|
||||
#! /bin/sh
|
||||
|
||||
PG_VERSION='13'
|
||||
|
||||
exec 2>&1
|
||||
if !( /usr/pgsql-${PG_VERSION}/bin/postgresql-${PG_VERSION}-check-db-dir /var/lib/pgsql/${PG_VERSION}/data > /dev/null )
|
||||
then
|
||||
PGSETUP_INITDB_OPTIONS="--pwfile='/var/lib/pgsql/.pg_pwd'" \
|
||||
/usr/pgsql-${PG_VERSION}/bin/postgresql-${PG_VERSION}-setup initdb
|
||||
/sbin/e-smith/expand-template /etc/e-smith/pgsql/init/00_restore_backup
|
||||
#else
|
||||
# ?? /bin/pgsql -U postgres < /var/lib/pgsql/set.password
|
||||
fi
|
Reference in New Issue
Block a user