Scheduled maintenance: Community will be offline Monday June 17th, 1:00 AM - 6:00 AM (PT)
Reply
Senior Member
Posts: 25,950
Registered: ‎08-04-2017
Kudos: 4866
Solutions: 1287

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello @BDT,

 

How many sites do you have on the controller?

May I take a look via TeamViewer?

 


Regards,
Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
US-XG-16 • US-48-500W • US-24-POE-250W 2x • US-16-POE-150W 3x • US-24 • US-8-150W • US-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
Senior Member
Posts: 25,950
Registered: ‎08-04-2017
Kudos: 4866
Solutions: 1287

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello @BDT,

 

Thank you for letting me take a quick look!

The script didn't upgrade all the devices since they were on the latest stable release 4.0.21

 

Seemed that there were a few UAPs that did need an upgrade though Man Happy

 

 

Regards,
Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
US-XG-16 • US-48-500W • US-24-POE-250W 2x • US-16-POE-150W 3x • US-24 • US-8-150W • US-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
Emerging Member
Posts: 68
Registered: ‎11-13-2013
Kudos: 10
Solutions: 3

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hey there,

thank you for the beautiful script.

Although fails both on Google Cloud Platform but also on a VM in Windows

 

Ubuntu 18.04 - Unifi 5.6.42

 

both report the same error

 

[2019-05-13 22:03:52,553] <UniFi> ERROR system - [exec] error, rc=1

The Google VM also cycles with 100% CPU usage

Highlighted
Senior Member
Posts: 25,950
Registered: ‎08-04-2017
Kudos: 4866
Solutions: 1287

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello @vaiost,

 

Upload the logs to a cloud drive and PM me the URL.

What are the specs of the VMs?

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
US-XG-16 • US-48-500W • US-24-POE-250W 2x • US-16-POE-150W 3x • US-24 • US-8-150W • US-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
New Member
Posts: 1
Registered: ‎04-25-2014

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Glenn, I spent hours trying to setup the controller on AWS and just when I was about to give up your script did the magic. Thanks a lot, you saved my day. 

Senior Member
Posts: 25,950
Registered: ‎08-04-2017
Kudos: 4866
Solutions: 1287

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello @tauruss,

 

Awesome, glad my scripts helped you out!

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
US-XG-16 • US-48-500W • US-24-POE-250W 2x • US-16-POE-150W 3x • US-24 • US-8-150W • US-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
New Member
Posts: 4
Registered: ‎01-11-2018

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

[ Edited ]

Hey @AmazedMender16,

 

THank you for the amazing scripts, I have been having Issues since upgrading my raspberry pi 3 Model B to stretch, more specifically with the mongodb installation which never succeds, I have tried many of the solutions found online including your script and I was not able to make it work, wanted to see if maybe you have something you might suggest me doing. Here is the script output

 

unifi_sysvinit_all.deb                          100%[======================================================================================================>]  77.46M  4.96MB/s    in 11s

2019-05-16 13:10:23 (6.97 MB/s) - ‘unifi_sysvinit_all.deb’ saved [81218244/81218244]

Selecting previously unselected package unifi.
(Reading database ... 155996 files and directories currently installed.)
Preparing to unpack unifi_sysvinit_all.deb ...
Unpacking unifi (5.10.23-11668-1) ...
dpkg: dependency problems prevent configuration of unifi:
 unifi depends on mongodb-server (>= 2.4.10) | mongodb-10gen (>= 2.4.14) | mongodb-org-server (>= 2.6.0); however:
  Package mongodb-server is not installed.
  Package mongodb-10gen is not installed.
  Package mongodb-org-server is not installed.
 unifi depends on mongodb-server (<< 1:3.6.0) | mongodb-10gen (<< 3.6.0) | mongodb-org-server (<< 3.6.0); however:
  Package mongodb-server is not installed.
  Package mongodb-10gen is not installed.
  Package mongodb-org-server is not installed.

dpkg: error processing package unifi (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (232-25+deb9u11) ...
Errors were encountered while processing:
 unifi
########################################################
#                                                      #
#             Fixing broken UniFi install!             #
#                                                      #
########################################################

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 unifi : Depends: mongodb-server (>= 2.4.10) but it is not installed or
                  mongodb-10gen (>= 2.4.14) but it is not installable or
                  mongodb-org-server (>= 2.6.0) but it is not installable
         Depends: mongodb-server (< 1:3.6.0) but it is not installed or
                  mongodb-10gen (< 3.6.0) but it is not installable or
                  mongodb-org-server (< 3.6.0) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

###############################################################

          An error occurred. Aborting script..
Please contact Glenn R. (AmazedMender16) on the Community Forums!

When trying to install mongodb with "sudo apt-get install -y mongodb" I get:

 

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libstdc++6 : Breaks: mongodb (<= 1:2.4.14-2) but 1:2.4.10-5+deb8u1 is to be installed
 mongodb : Depends: mongodb-dev but it is not going to be installed
           Depends: mongodb-server (>= 1:2.4.1-2) but it is not going to be installed
 unifi : Depends: mongodb-server (>= 2.4.10) but it is not going to be installed or
                  mongodb-10gen (>= 2.4.14) but it is not installable or
                  mongodb-org-server (>= 2.6.0) but it is not installable
         Depends: mongodb-server (< 1:3.6.0) but it is not going to be installed or
                  mongodb-10gen (< 3.6.0) but it is not installable or
                  mongodb-org-server (< 3.6.0) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Running sudo apt --fix-broken install yields:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 unifi : Depends: mongodb-server (>= 2.4.10) but it is not installed or
                  mongodb-10gen (>= 2.4.14) but it is not installable or
                  mongodb-org-server (>= 2.6.0) but it is not installable
         Depends: mongodb-server (< 1:3.6.0) but it is not installed or
                  mongodb-10gen (< 3.6.0) but it is not installable or
                  mongodb-org-server (< 3.6.0) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

I have already done "sudp apt-get upate", "sudo apt-get upgrade" and "sudo apt-get dist-upgrade" countless times, my sources.list has in it:

deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free

deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free

deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security/ stretch/updates main contrib non-free




for sb_release -a:

Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 9.9 (stretch)
Release:        9.9
Codename:       stretch

I'm using

Installation script for UniFi 5.10.23 - Debian 9 ( MX 18 )

Would appreciate any assistance anyone might have on this issue, thank you!

Senior Member
Posts: 25,950
Registered: ‎08-04-2017
Kudos: 4866
Solutions: 1287

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

[ Edited ]

Hello @izzatissa,

 

You could try this.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 9ECBEC467F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install -y mongodb-org

 

I would also like to take a look via TeamViewer ( PM me the details )

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
US-XG-16 • US-48-500W • US-24-POE-250W 2x • US-16-POE-150W 3x • US-24 • US-8-150W • US-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
New Member
Posts: 4
Registered: ‎01-11-2018

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

No cigar, got the following signature error

root@raspberrypi:/etc/apt# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 9ECBEC467F0CEB10
Executing: /tmp/apt-key-gpghome.4OhGmLbiaq/gpg.1.sh --keyserver keyserver.ubuntu.com --recv 9ECBEC467F0CEB10
gpg: key 9ECBEC467F0CEB10: 1 signature not checked due to a missing key
gpg: key 9ECBEC467F0CEB10: "Richard Kreuter <richard@10gen.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
root@raspberrypi:/etc/apt# echo 'deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen
root@raspberrypi:/etc/apt# sudo apt-get update
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Ign:2 http://deb.debian.org/debian stretch InRelease
Ign:3 http://downloads-distro.mongodb.org/repo/debian-sysvinit dist InRelease
Hit:4 http://deb.debian.org/debian stretch-updates InRelease
Hit:5 http://deb.debian.org/debian stretch Release
Hit:8 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease
Hit:9 http://downloads-distro.mongodb.org/repo/debian-sysvinit dist Release
Hit:10 http://archive.raspberrypi.org/debian stretch InRelease
Hit:11 http://archive.debian.org/debian jessie-backports InRelease
Get:12 http://downloads-distro.mongodb.org/repo/debian-sysvinit dist Release.gpg [490 B]
Ign:13 http://archive.debian.org/debian jessie InRelease
Hit:14 https://deb.nodesource.com/node_8.x stretch InRelease
Hit:15 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Hit:7 http://dl.ubnt.com/unifi/debian stable InRelease
Hit:16 http://archive.debian.org/debian jessie Release
Hit:6 https://dl.ubnt.com/unifi/debian stable InRelease
Ign:12 http://downloads-distro.mongodb.org/repo/debian-sysvinit dist Release.gpg
Fetched 490 B in 6s (79 B/s)
Reading package lists... Done
W: GPG error: http://downloads-distro.mongodb.org/repo/debian-sysvinit dist Release: The following signatures were invalid: 492EAFE8CD016A07919F1D2B9ECBEC467F0CEB10
W: The repository 'http://downloads-distro.mongodb.org/repo/debian-sysvinit dist Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Skipping acquire of configured file '10gen/binary-armhf/Packages' as repository 'http://downloads-distro.mongodb.org/repo/debian-sysvinit dist InRelease' doesn't support architecture 'armh                                              f'

I'll pm you!

Member
Posts: 273
Registered: ‎07-19-2015
Kudos: 9
Solutions: 2

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

This is great thanks!

Senior Member
Posts: 25,950
Registered: ‎08-04-2017
Kudos: 4866
Solutions: 1287

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello @ryan123,

 

Glad my scripts helped you out!

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
US-XG-16 • US-48-500W • US-24-POE-250W 2x • US-16-POE-150W 3x • US-24 • US-8-150W • US-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
New Member
Posts: 1
Registered: ‎09-10-2015

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

I really appreciate this script! It makes updating my contollers so much faster and easier, thanks Glenn!

Senior Member
Posts: 25,950
Registered: ‎08-04-2017
Kudos: 4866
Solutions: 1287

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello @cechance88,

 

You're welcome, glad it's helping you out!

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
US-XG-16 • US-48-500W • US-24-POE-250W 2x • US-16-POE-150W 3x • US-24 • US-8-150W • US-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
New Member
Posts: 4
Registered: ‎01-11-2018

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

FIXED,

 

Nothing wrong with the script, and definitely nothing the script should have checked for, in my previous interrupted update attempt from Jessie to Stretch, I corrupted my sources.list file and replaced it, however, I mistakenly replaced it for the Debian sources.list instead of the raspbian sources.list.

 

After changing it back to raspbian repos and running a lenghtly sudo-apt get update and upgrade, the error dissappeared. and I can now access my controller again.

Senior Member
Posts: 25,950
Registered: ‎08-04-2017
Kudos: 4866
Solutions: 1287

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello @izzatissa,

 

Awesome, thank you for reporting back!

Should have looked at these...

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
US-XG-16 • US-48-500W • US-24-POE-250W 2x • US-16-POE-150W 3x • US-24 • US-8-150W • US-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
New Member
Posts: 23
Registered: ‎09-19-2017

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hi

 

Good job, works as it should. Took 5 min Smiley Happy
Just one more question I have?
How do I do if I want to update the controll from:
5.10.20.to 5.10.23
What commands do I have to drive?

 

Best regards,

Njanja

Senior Member
Posts: 25,950
Registered: ‎08-04-2017
Kudos: 4866
Solutions: 1287

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello @njanja,

 

Run the commands below.

wget https://get.glennr.nl/unifi/update/unifi-update.sh; chmod +x unifi-update.sh; ./unifi-update.sh

Thank you for your feedback!

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
US-XG-16 • US-48-500W • US-24-POE-250W 2x • US-16-POE-150W 3x • US-24 • US-8-150W • US-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
New Member
Posts: 5
Registered: ‎02-28-2017

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Please my old NVR unifi with 500 gb HD crash I just install ubunto 16.04 and need the scripts install, I try with scripts you posted here but not run on system 32 bit, please help ASAP

Senior Member
Posts: 25,950
Registered: ‎08-04-2017
Kudos: 4866
Solutions: 1287

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello @apluspcnet,

 

Could you please give some more information?

Believe the UniFi NVR runs debian.

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation Scripts | UniFi-VoIP Installation Scripts
USG-XG-8 • USG-4-PRO • USG
US-XG-16 • US-48-500W • US-24-POE-250W 2x • US-16-POE-150W 3x • US-24 • US-8-150W • US-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD 2x • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M • UAP-AC-M-PRO 2x
UAS-XG • UCK-G2-PLUS • UCK-G2 • UCK
New Member
Posts: 18
Registered: ‎07-05-2015
Kudos: 1
Solutions: 1

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

18.10

Thank you, installed perfectly

Reply