mirror of
https://github.com/mtan93/unifi-linux-utils.git
synced 2026-04-01 14:23:09 +01:00
This commit is contained in:
@@ -3,16 +3,17 @@
|
|||||||
# upgrade_unifi.sh
|
# upgrade_unifi.sh
|
||||||
# Easy UniFi Controller Upgrade Script for Unix/Linux Systems
|
# Easy UniFi Controller Upgrade Script for Unix/Linux Systems
|
||||||
# by Steve Jenkins (stevejenkins.com)
|
# by Steve Jenkins (stevejenkins.com)
|
||||||
# Last Updated June 23, 2016
|
# Last Updated June 24, 2016
|
||||||
|
|
||||||
# REQUIREMENTS
|
# REQUIREMENTS
|
||||||
# 1) Assumes you already have any version of UniFi Controller installed
|
# 1) Assumes you already have any version of UniFi Controller installed
|
||||||
# and running on your system
|
# and running on your system.
|
||||||
# 2) Requires a service start/stop script to properly shut down and
|
# 2) Assumes a user named "ubnt" owns the /opt/UniFi directory.
|
||||||
# restart the UniFi controller before and after upgrade. I've written
|
# 3) Requires a service start/stop script to properly shut down and
|
||||||
# compatible startup scrips for SysV and systemd systems at
|
# restart the UniFi controller before and after upgrade. I've written
|
||||||
# http://wp.me/p1iGgP-2wl
|
# compatible startup scrips for SysV and systemd systems at
|
||||||
# 3) Requires wget command to fetch the software from UBNT's download site
|
# http://wp.me/p1iGgP-2wl
|
||||||
|
# 4) Requires wget command to fetch the software from UBNT's download site.
|
||||||
|
|
||||||
# USAGE
|
# USAGE
|
||||||
# Modify the "unifi_version" variable below using the version number you
|
# Modify the "unifi_version" variable below using the version number you
|
||||||
@@ -25,6 +26,7 @@
|
|||||||
unifi_version=5.0.7
|
unifi_version=5.0.7
|
||||||
|
|
||||||
# Additional variables (defaults should work fine on most systems)
|
# Additional variables (defaults should work fine on most systems)
|
||||||
|
unifi_user=ubnt
|
||||||
unifi_parent_dir=/opt
|
unifi_parent_dir=/opt
|
||||||
unifi_dir=/opt/UniFi
|
unifi_dir=/opt/UniFi
|
||||||
unifi_backup_dir=/opt/UniFi_bak
|
unifi_backup_dir=/opt/UniFi_bak
|
||||||
@@ -84,6 +86,9 @@ printf "\nExtracting UniFi Controller backup data to new directory..."
|
|||||||
tar zxf $temp_dir/unifi_data_bak.tar.gz -C $unifi_dir &
|
tar zxf $temp_dir/unifi_data_bak.tar.gz -C $unifi_dir &
|
||||||
show_dots $!
|
show_dots $!
|
||||||
|
|
||||||
|
# Enforce proper ownership of UniFi directory
|
||||||
|
chown -R $unifi_user:$unifi_user $unifi_dir
|
||||||
|
|
||||||
# Restart the local UniFi Controller service
|
# Restart the local UniFi Controller service
|
||||||
printf "\n"
|
printf "\n"
|
||||||
service UniFi start
|
service UniFi start
|
||||||
|
|||||||
Reference in New Issue
Block a user