+if [ ! -f /usr/share/GeoIP/GeoLiteCity.dat ]; then
+ rm -f /usr/share/GeoIP/GeoLiteCity.*
+ wget -P /usr/share/GeoIP http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
+ gzip -d /usr/share/GeoIP/GeoLiteCity*.gz
+fi
+
+if [ "$1" == 2 ] ; then
+ if [[ -e /opt/planetstack/scripts/opencloud ]]; then
+ echo "UPGRADE - saving current state"
+ /opt/planetstack/scripts/opencloud dumpdata
+ fi
+fi
+