Mercurial Hosting > luan
annotate host/macos/addStartupScriptsPostgres.sh @ 1670:0046c5eb3315
update manual.html
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 10 May 2022 17:08:50 -0600 |
parents | f53301a50084 |
children |
rev | line source |
---|---|
1632 | 1 #!/bin/bash |
2 | |
3 SLAVE_IP=$1; | |
1638 | 4 |
5 if [ "$1" == "" ]; then | |
6 SLAVE_IP="127.0.0.1"; | |
7 fi; | |
8 | |
1632 | 9 . startupScripts.sh; |
1633 | 10 mkdir -p $localStartup"/postgres" 2>/dev/null; |
1632 | 11 |
12 cd $startupPostgres; | |
13 for file in *.plist; do | |
14 log=${ROOTPWD}"/logs/startup.${file}.log"; | |
15 sed "s~PWD~${startup}~g;\ | |
16 s~LOG~${log}~g;\ | |
17 s~USER~${user}~g;\ | |
18 s~ROOT~${ROOTPWD}~g" $file > ${localStartup}/${file}; | |
19 done; | |
20 | |
1635
fd3d56f39450
rearrange startup files
Franklin Schmidt <fschmidt@gmail.com>
parents:
1633
diff
changeset
|
21 cd $ROOTPWD/startup/postgres; |
1632 | 22 |
1633 | 23 cp postgresql.conf ${localStartup}/postgres/postgresql.conf; |
1632 | 24 mv /usr/local/var/postgresql@9.5/postgresql.conf /usr/local/var/postgresql@9.5/postgresql.conf.bak; |
25 ln -sf ${localStartup}/postgres/postgresql.conf /usr/local/var/postgresql@9.5/postgresql.conf; | |
26 | |
1633 | 27 sed "s/SLAVE_IP/${SLAVE_IP}/g" pg_hba.conf > ${localStartup}/postgres/pg_hba.conf; |
1632 | 28 mv /usr/local/var/postgresql@9.5/pg_hba.conf /usr/local/var/postgresql@9.5/pg_hba.conf.bak; |
29 ln -sf ${localStartup}/postgres/pg_hba.conf /usr/local/var/postgresql@9.5/pg_hba.conf; | |
30 | |
31 addStartup; | |
32 | |
33 cd $ROOTPWD; |