Browse Source

start

master
M.Goldshteyn 1 year ago
parent
commit
d9672a2f29
  1. 5
      migration.sh

5
migration.sh

@ -27,7 +27,10 @@ fi @@ -27,7 +27,10 @@ fi
download_platform(){
# 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"
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"
sshpass -p "$DESTINATION_PASSWORD" ssh $DESTINATION_USER@$DESTINATION_IP -p $DESTINATION_PORT "systemctl is-active --quiet platform5.service && systemctl stop platform5 && \
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"
IFS=',' read -r -a array <<< "$PLATFORM_DIRS"

Loading…
Cancel
Save