Last active
March 10, 2018 01:23
-
-
Save hannesbe/f23c1f339904bc0ee484455a9ca6d978 to your computer and use it in GitHub Desktop.
Update Netbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Update script for Nextbox on CentOS 7 | |
# Releases on https://github.com/digitalocean/netbox/releases | |
# | |
# Example usage: | |
# NETBOX_RELEASE=2.2.6 ./update-netbox.sh | |
cd /opt | |
wget https://github.com/digitalocean/netbox/archive/v$NETBOX_RELEASE.tar.gz | |
tar -xzf v$NETBOX_RELEASE.tar.gz -C /opt | |
cp netbox/netbox/netbox/configuration.py netbox-$NETBOX_RELEASE/netbox/netbox/configuration.py | |
cp netbox/gunicorn_config.py netbox-$NETBOX_RELEASE/gunicorn_config.py | |
cd netbox-$NETBOX_RELEASE | |
./upgrade.sh | |
rm -f /opt/netbox | |
ln -sf /opt/netbox-$NETBOX_RELEASE /opt/netbox | |
supervisorctl restart netbox | |
systemctl restart supervisord.service | |
systemctl restart nginx.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment