upgrade.sh 763 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env bash
  2. systemctl stop jimvn
  3. systemctl stop jimvc
  4. deactivate
  5. sed -i '/\/usr\/local\/venv-jimv\/bin\/activate/d' ~/.bashrc
  6. mysql -u jimv -p < update.sql
  7. DEL S:IP:Used
  8. DEL S:IP:Available
  9. DEL S:VNCPort:Used
  10. DEL S:VNCPort:Available
  11. DEL H:GlobalConfig
  12. cat > /etc/yum.repos.d/JimV.repo << EOF
  13. [JimV]
  14. name=JimV - \$basearch
  15. baseurl=http://repo.jimv.cn/centos/7/os/\$basearch
  16. http://repo.jimv.io/centos/7/os/\$basearch
  17. http://repo.iit.im/centos/7/os/\$basearch
  18. failovermethod=priority
  19. enabled=1
  20. gpgcheck=0
  21. gpgkey=https://repo.jimv.cn/RPM-GPG-KEY-JIMV-114EA591
  22. EOF
  23. rm -f /etc/systemd/system/jimvc.service
  24. rm -rf /usr/local/venv-jimv
  25. rm -rf /usr/local/JimV-C
  26. yum install jimv-controller -y
  27. systemctl daemon-reload
  28. systemctl restart jimvc