From hava, 5 Years ago, written in Bash.
Embed
  1. #!/bin/bash
  2.  
  3. #
  4. # Update script for Nextbox on CentOS 7
  5. #   Releases on https://github.com/digitalocean/netbox/releases
  6. #
  7.  
  8. release=2.0.4
  9.  
  10. cd /opt
  11. wget https://github.com/digitalocean/netbox/archive/v$release.tar.gz
  12. tar -xzf v$release.tar.gz -C /opt
  13. cp netbox/netbox/netbox/configuration.py netbox-$release/netbox/netbox/configuration.py
  14. cp netbox/gunicorn_config.py netbox-$release/gunicorn_config.py
  15. cd netbox-$release
  16. ./upgrade.sh
  17. rm -f /opt/netbox
  18. ln -sf /opt/netbox-$release /opt/netbox
  19. supervisorctl restart netbox
  20. systemctl restart supervisord.service
  21. systemctl restart nginx.service
  22.