annotate host/macos/addStartupScriptsPostgres.sh @ 1637:a65802b06b01

add nginx scripts
author fffilimonov
date Thu, 16 Dec 2021 14:17:51 +0000
parents fd3d56f39450
children f53301a50084
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
1 #!/bin/bash
0344a535b1db add doc
fffilimonov
parents:
diff changeset
2
0344a535b1db add doc
fffilimonov
parents:
diff changeset
3 SLAVE_IP=$1;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
4 . startupScripts.sh;
1633
665049cffc02 fix path
fffilimonov
parents: 1632
diff changeset
5 mkdir -p $localStartup"/postgres" 2>/dev/null;
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
6
0344a535b1db add doc
fffilimonov
parents:
diff changeset
7 cd $startupPostgres;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
8 for file in *.plist; do
0344a535b1db add doc
fffilimonov
parents:
diff changeset
9 log=${ROOTPWD}"/logs/startup.${file}.log";
0344a535b1db add doc
fffilimonov
parents:
diff changeset
10 sed "s~PWD~${startup}~g;\
0344a535b1db add doc
fffilimonov
parents:
diff changeset
11 s~LOG~${log}~g;\
0344a535b1db add doc
fffilimonov
parents:
diff changeset
12 s~USER~${user}~g;\
0344a535b1db add doc
fffilimonov
parents:
diff changeset
13 s~ROOT~${ROOTPWD}~g" $file > ${localStartup}/${file};
0344a535b1db add doc
fffilimonov
parents:
diff changeset
14 done;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
15
1635
fd3d56f39450 rearrange startup files
Franklin Schmidt <fschmidt@gmail.com>
parents: 1633
diff changeset
16 cd $ROOTPWD/startup/postgres;
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
17
1633
665049cffc02 fix path
fffilimonov
parents: 1632
diff changeset
18 cp postgresql.conf ${localStartup}/postgres/postgresql.conf;
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
19 mv /usr/local/var/postgresql@9.5/postgresql.conf /usr/local/var/postgresql@9.5/postgresql.conf.bak;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
20 ln -sf ${localStartup}/postgres/postgresql.conf /usr/local/var/postgresql@9.5/postgresql.conf;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
21
1633
665049cffc02 fix path
fffilimonov
parents: 1632
diff changeset
22 sed "s/SLAVE_IP/${SLAVE_IP}/g" pg_hba.conf > ${localStartup}/postgres/pg_hba.conf;
1632
0344a535b1db add doc
fffilimonov
parents:
diff changeset
23 mv /usr/local/var/postgresql@9.5/pg_hba.conf /usr/local/var/postgresql@9.5/pg_hba.conf.bak;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
24 ln -sf ${localStartup}/postgres/pg_hba.conf /usr/local/var/postgresql@9.5/pg_hba.conf;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
25
0344a535b1db add doc
fffilimonov
parents:
diff changeset
26 addStartup;
0344a535b1db add doc
fffilimonov
parents:
diff changeset
27
0344a535b1db add doc
fffilimonov
parents:
diff changeset
28 cd $ROOTPWD;