Mercurial Hosting > luan
annotate 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 | 
| rev | line source | 
|---|---|
| 1632 | 1 #!/bin/bash | 
| 2 | |
| 3 SLAVE_IP=$1; | |
| 4 . startupScripts.sh; | |
| 1633 | 5 mkdir -p $localStartup"/postgres" 2>/dev/null; | 
| 1632 | 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 | |
| 
1635
 
fd3d56f39450
rearrange startup files
 
Franklin Schmidt <fschmidt@gmail.com> 
parents: 
1633 
diff
changeset
 | 
16 cd $ROOTPWD/startup/postgres; | 
| 1632 | 17 | 
| 1633 | 18 cp postgresql.conf ${localStartup}/postgres/postgresql.conf; | 
| 1632 | 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 | |
| 1633 | 22 sed "s/SLAVE_IP/${SLAVE_IP}/g" pg_hba.conf > ${localStartup}/postgres/pg_hba.conf; | 
| 1632 | 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; | 
