Ver código fonte

走通升级脚本

James Iter 7 anos atrás
pai
commit
6b2dce0d1d
2 arquivos alterados com 28 adições e 0 exclusões
  1. 2 0
      misc/v0.7_to_v0.8/update.sql
  2. 26 0
      misc/v0.7_to_v0.8/upgrade.sh

+ 2 - 0
misc/v0.7_to_v0.8/update.sql

@@ -1,3 +1,5 @@
+USE jimv;
+
 CREATE TABLE IF NOT EXISTS ip_pool(
     id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
     start_ip CHAR(15) NOT NULL,

+ 26 - 0
misc/v0.7_to_v0.8/upgrade.sh

@@ -1,6 +1,32 @@
 #!/usr/bin/env bash
 
+systemctl stop jimvn
+systemctl stop jimvc
+
+deactivate
+mysql -u jimv -p < update.sql
+
 DEL S:IP:Used
 DEL S:IP:Available
 DEL S:VNCPort:Used
 DEL S:VNCPort:Available
+DEL H:GlobalConfig
+
+cat > /etc/yum.repos.d/JimV.repo << EOF
+[JimV]
+name=JimV - \$basearch
+baseurl=http://repo.jimv.cn/centos/7/os/\$basearch
+        http://repo.jimv.io/centos/7/os/\$basearch
+        http://repo.iit.im/centos/7/os/\$basearch
+failovermethod=priority
+enabled=1
+gpgcheck=0
+gpgkey=https://repo.jimv.cn/RPM-GPG-KEY-JIMV-114EA591
+EOF
+
+rm -f /etc/systemd/system/jimvc.service
+rm -rf /usr/local/venv-jimv
+rm -rf /usr/local/JimV-C
+
+yum install jimv-controller -y
+systemctl daemon-reload