changeset 1633:665049cffc02

fix path
author fffilimonov
date Tue, 14 Dec 2021 07:55:47 -0600
parents 0344a535b1db
children 894d9069c792
files host/addStartupScriptsPostgres.sh host/check_app.sh host/doc/backup.txt host/removeStartupScripts.sh host/start.sh
diffstat 5 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
diff -r 0344a535b1db -r 665049cffc02 host/addStartupScriptsPostgres.sh
--- a/host/addStartupScriptsPostgres.sh	Tue Dec 14 07:41:01 2021 +0000
+++ b/host/addStartupScriptsPostgres.sh	Tue Dec 14 07:55:47 2021 -0600
@@ -1,9 +1,8 @@
 #!/bin/bash
 
 SLAVE_IP=$1;
-
-mkdir -p $localStartup/postgres 2>/dev/null;
 . startupScripts.sh;
+mkdir -p $localStartup"/postgres" 2>/dev/null;
 
 cd $startupPostgres;
 for file in *.plist; do
@@ -16,11 +15,11 @@
 
 cd ../;
 
-cp postgres/postgresql.conf ${localStartup}/postgres/postgresql.conf;
+cp postgresql.conf ${localStartup}/postgres/postgresql.conf;
 mv /usr/local/var/postgresql@9.5/postgresql.conf /usr/local/var/postgresql@9.5/postgresql.conf.bak;
 ln -sf ${localStartup}/postgres/postgresql.conf /usr/local/var/postgresql@9.5/postgresql.conf;
 
-sed "s/SLAVE_IP/${SLAVE_IP}/g" postgres/pg_hba.conf > ${localStartup}/postgres/pg_hba.conf;
+sed "s/SLAVE_IP/${SLAVE_IP}/g" pg_hba.conf > ${localStartup}/postgres/pg_hba.conf;
 mv /usr/local/var/postgresql@9.5/pg_hba.conf /usr/local/var/postgresql@9.5/pg_hba.conf.bak;
 ln -sf ${localStartup}/postgres/pg_hba.conf /usr/local/var/postgresql@9.5/pg_hba.conf;
 
diff -r 0344a535b1db -r 665049cffc02 host/check_app.sh
--- a/host/check_app.sh	Tue Dec 14 07:41:01 2021 +0000
+++ b/host/check_app.sh	Tue Dec 14 07:55:47 2021 -0600
@@ -1,5 +1,7 @@
 PIDS="";
 
+export PATH="$PATH:/usr/local/bin";
+
 function getPids() {
   PIDS=$(ps ax | awk '{if($0~"[r]un.luan"){print $1}}');
 }
diff -r 0344a535b1db -r 665049cffc02 host/doc/backup.txt
--- a/host/doc/backup.txt	Tue Dec 14 07:41:01 2021 +0000
+++ b/host/doc/backup.txt	Tue Dec 14 07:55:47 2021 -0600
@@ -6,7 +6,7 @@
 brew tap caskroom/versions
 brew install postgresql@9.5
 
-./addStartupScriptsPostgres.sh
+./addStartupScriptsPostgres.sh slave_ip
 
 create replica
 
diff -r 0344a535b1db -r 665049cffc02 host/removeStartupScripts.sh
--- a/host/removeStartupScripts.sh	Tue Dec 14 07:41:01 2021 +0000
+++ b/host/removeStartupScripts.sh	Tue Dec 14 07:55:47 2021 -0600
@@ -6,5 +6,5 @@
 
 for file in *.plist; do
 	sudo rm ${systemStarup}/${file};
-	rm $file;
+	sudo rm $file;
 done;
diff -r 0344a535b1db -r 665049cffc02 host/start.sh
--- a/host/start.sh	Tue Dec 14 07:41:01 2021 +0000
+++ b/host/start.sh	Tue Dec 14 07:55:47 2021 -0600
@@ -14,7 +14,7 @@
 mkdir -p logs 2>/dev/null;
 
 touch started.lock;
-
+sudo $(which nginx) -c $(pwd)/local/nginx.conf;
 if [ "$1" == "launchd" ]; then
   java -Xms1024M -classpath $CLASSPATH luan.Luan run.luan logs 1>logs/stdout.log 2>logs/stderr.log
 else
@@ -34,5 +34,3 @@
 
   checkRunning;
 fi;
-
-sudo $(which nginx) -c $(pwd)/local/nginx.conf;