|
|
|
|
@ -29,9 +29,8 @@ download_platform(){
@@ -29,9 +29,8 @@ download_platform(){
|
|
|
|
|
|
|
|
|
|
sshpass -p "$DESTINATION_PASSWORD" ssh $DESTINATION_USER@$DESTINATION_IP -p $DESTINATION_PORT "systemctl is-active --quiet platform5.service && systemctl stop platform5 " |
|
|
|
|
sshpass -p "$DESTINATION_PASSWORD" ssh $DESTINATION_USER@$DESTINATION_IP -p $DESTINATION_PORT "mv /home/platform5-server /home/platform5-server-${DATE} && \ |
|
|
|
|
mkdir -p /home/platform5-server && \ |
|
|
|
|
mkdir -p /home/platform5-server/bin/storage/1" |
|
|
|
|
PLATFORM_DIRS="conf,lib,opencv,webapp,scripts,SERVER_config.txt" |
|
|
|
|
PLATFORM_DIRS="conf,lib,opencv,webapp,scripts,monitoring,SERVER_config.txt" |
|
|
|
|
IFS=',' read -r -a array <<< "$PLATFORM_DIRS" |
|
|
|
|
|
|
|
|
|
for folder in "${array[@]}"; do |
|
|
|
|
@ -80,8 +79,9 @@ create_and_restore_db() {
@@ -80,8 +79,9 @@ create_and_restore_db() {
|
|
|
|
|
|
|
|
|
|
change_config(){ |
|
|
|
|
# sshpass -p "$DESTINATION_PASSWORD" ssh $DESTINATION_USER@$DESTINATION_IP -p $DESTINATION_PORT "sed -i \"s|\(jdbc:postgresql://localhost:5432/\)[^?]*|\1${DESTINATION_DB_NAME}|g\" $DESTINATION_PLATFORM_PATH/conf/db.conf" |
|
|
|
|
#db wo host sshpass -p "$DESTINATION_PASSWORD" ssh $DESTINATION_USER@$DESTINATION_IP -p $DESTINATION_PORT "sed -i \"s|\(jdbc:postgresql://[^:/]*:[0-9]*/\)[^?]*|\1${DESTINATION_DB_NAME}|g\" $DESTINATION_PLATFORM_PATH/conf/db.conf" |
|
|
|
|
|
|
|
|
|
sshpass -p "$DESTINATION_PASSWORD" ssh $DESTINATION_USER@$DESTINATION_IP -p $DESTINATION_PORT "sed -i \"s|\(jdbc:postgresql://[^:/]*:[0-9]*/\)[^?]*|\1${DESTINATION_DB_NAME}|g\" $DESTINATION_PLATFORM_PATH/conf/db.conf" |
|
|
|
|
sshpass -p "$DESTINATION_PASSWORD" ssh $DESTINATION_USER@$DESTINATION_IP -p $DESTINATION_PORT "sed -i \"s|\(jdbc:postgresql://[^:/]*:[0-9]*/\)[^?]*|\1${INTERNAL_DATABASE_IP}:5432/${DESTINATION_DB_NAME}|g\" $DESTINATION_PLATFORM_PATH/conf/db.conf" |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -130,6 +130,10 @@ fonts_rsync
@@ -130,6 +130,10 @@ fonts_rsync
|
|
|
|
|
else echo "EVENT_COMMON value must be 0 or 1 or 2" && exit |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mv config.txt config.txt.$DATE |
|
|
|
|
mv config.txt.template config.txt |
|
|
|
|
|
|
|
|
|
|