#!/usr/local/bin/bashservice unifi stoppkg remove -y unifi6mv /usr/local/share/java/unifi /usr/local/share/java/unifi.badpkg install -y unifi6 os-unifi-maxitcp -pRv /usr/local/share/java/unifi.bad/data/backup /usr/local/share/java/unifi/data/backupservice unifi startrm -rf /usr/local/share/java/unifi.badipaddr=$(ifconfig em1 | grep 'inet' | awk '$1 == "inet" { print $2 }') echo "Now to go https://$ipaddr:8443 and restore your backup."read -p "Press enter to continue" continueservice unifi start