Mercurial Hosting > luan
comparison host/macos/addStartupScriptsPostgres.sh @ 1635:fd3d56f39450
rearrange startup files
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Tue, 14 Dec 2021 18:50:43 -0700 |
| parents | host/addStartupScriptsPostgres.sh@665049cffc02 |
| children | f53301a50084 |
comparison
equal
deleted
inserted
replaced
| 1634:894d9069c792 | 1635:fd3d56f39450 |
|---|---|
| 1 #!/bin/bash | |
| 2 | |
| 3 SLAVE_IP=$1; | |
| 4 . startupScripts.sh; | |
| 5 mkdir -p $localStartup"/postgres" 2>/dev/null; | |
| 6 | |
| 7 cd $startupPostgres; | |
| 8 for file in *.plist; do | |
| 9 log=${ROOTPWD}"/logs/startup.${file}.log"; | |
| 10 sed "s~PWD~${startup}~g;\ | |
| 11 s~LOG~${log}~g;\ | |
| 12 s~USER~${user}~g;\ | |
| 13 s~ROOT~${ROOTPWD}~g" $file > ${localStartup}/${file}; | |
| 14 done; | |
| 15 | |
| 16 cd $ROOTPWD/startup/postgres; | |
| 17 | |
| 18 cp postgresql.conf ${localStartup}/postgres/postgresql.conf; | |
| 19 mv /usr/local/var/postgresql@9.5/postgresql.conf /usr/local/var/postgresql@9.5/postgresql.conf.bak; | |
| 20 ln -sf ${localStartup}/postgres/postgresql.conf /usr/local/var/postgresql@9.5/postgresql.conf; | |
| 21 | |
| 22 sed "s/SLAVE_IP/${SLAVE_IP}/g" pg_hba.conf > ${localStartup}/postgres/pg_hba.conf; | |
| 23 mv /usr/local/var/postgresql@9.5/pg_hba.conf /usr/local/var/postgresql@9.5/pg_hba.conf.bak; | |
| 24 ln -sf ${localStartup}/postgres/pg_hba.conf /usr/local/var/postgresql@9.5/pg_hba.conf; | |
| 25 | |
| 26 addStartup; | |
| 27 | |
| 28 cd $ROOTPWD; |
