Hi!
I had some strange behaviour that I wanted to see if was still relevant, so I updated to the latest. I have been using the script proposed below, but that broke after the folder structure revamp. I reinstalled, and thought the script should work now, but guess the script was missing something critical. At least all my things are now gone… My script is as follows:
#!/bin/bash
#
# This script will update your OpenHAB 2 installation.
# The script assumes that the OpenHAB 2 is already installed. Please shut it down and then run the script
# If OpenHAB 2 is not already installed, create the directories ahead of time, and it will install OpenHAB 2
#
# v2 Greatly simplified for the new OpenHAB2 Karaf online distribution
# v1.1 Jim Howard
#
# The location for archive downloads
DOWN="/opt/DOWN"
# The location of the openHAB installation
HAB="/opt/openhab2"
mkdir -p $DOWN || (echo "cannot make dir $DOWN";exit 1)
mkdir -p $HAB || (echo "cannot make dir $HAB ";exit 1)
#
# OpenHAB2 section
#
cd $DOWN
wget -N https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab-online/target/openhab-online-2.0.0-SNAPSHOT.zip || (echo "failure downloading OH2";exit 1)
cd $HAB
rm -rf $HAB/runtime
rm -r $HAB/userdata/cache/*
rm -r $HAB/userdata/tmp/*
unzip -n $DOWN/openhab-online-2.0.0-SNAPSHOT.zip
# clear up some windows clutter not needed with *nix systems
rm $HAB/*.bat
Before the upgraded, I backed up conf and userdata. Would someone be so kind to advise how to properly upgrade?
I looked at the following articles first, but found the information a little to comprehensive as well as “flaky”: