/lib/upgrade-clockwerk |
@@ -42,71 +42,55 @@ |
# OpenSim upgrade |
pushd ./ |
cd ../ |
if [ ! -d opensim-sources ]; then |
svn co http://svn.was.fm/opensim opensim-sources |
fi |
echo "[Clockwerk] Updating sources..." |
rm -rf clockwerk-opensim |
rm -rf /srv/clockwerk/clockwerk-opensim |
svn co --config-option servers:global:http-timeout=300 http://svn.was.fm/clockwerk-opensim |
cd clockwerk-opensim |
svn update --accept base |
cd opensim-sources |
svn update |
dialog --yesno "By selecting yes here, the OpenSim sources will be updated from the development repository, compiled and added to the current OpenSim working directory. Selecting yes here will not affect any modifications you may have done to OpenSim's ini files. Upgrade the OpenSim binaries to the lastest development version?" 10 70 |
if [ $? == "0" ]; then |
echo "[Clockwerk] Cleaning..." |
yes | ./runprebuild.sh clean |
echo "[Clockwerk] Prebuild..." |
./runprebuild.sh |
make clean |
echo "[Clockwerk] Build..." |
nant |
if [ ! -d /srv/opensim ]; then |
mkdir -p /srv/opensim |
make |
if [ -d /home/opensim/os ]; then |
echo "[Clockwerk] Copying files..." |
mkdir -p /home/opensim/os |
find bin/ -name \*.ini -exec rm -rf '{}' \; |
find bin/ -name \*.config -exec rm -rf '{}' \; |
find bin/ -name assets -exec rm -rf '{}' \; |
find bin/ -name assetcache -exec -rm -rf '{}' \; |
cp -Ra bin/* /home/opensim/os/ |
echo "[Clockwerk] Changing ownership..." |
chown -R opensim:opensim /home/opensim/os/ |
fi |
echo "[Clockwerk] Copying files..." |
mkdir -p /srv/opensim |
find bin/ -name \*.ini -o -name \*.config -o -name assets -o -name assetcache -exec rm -rf '{}' \; |
cp -Ra bin/* /srv/opensim/ |
echo "[Clockwerk] Changing ownership..." |
chown -R opensim:opensim /srv/opensim/ |
fi |
if [ -d ../clockwerk-opensim-config/ ]; then |
cd ../clockwerk-opensim-config/ |
if [ -d ../opensim-config/ ]; then |
cd ../opensim-config/ |
svn update |
dialog --yesno "This option will update OpenSim's configuration files EXCEPT Regions.ini which will not be overwritten. It is useful to synchronize OpenSim's configuration files with new options from the development branch. If you have made changes to OpenSim's ini files, a resonable answer will be no. However, at some point you should make a backup and sync with the development version. Update the configuration files now?" 12 70 |
if [ $? == "0" ]; then |
if [ ! -d /srv/opensim ]; then |
mkdir -p /srv/opensim |
fi |
echo "[Clockwerk] Updating configuration..." |
cp -Ra * /srv/opensim/ |
echo "[Clockwerk] Changing ownership..." |
chown -R opensim:opensim /srv/opensim/ |
cp -Ra * /home/opensim/os/ |
mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -D opensim -e "delete from assets where id='00000000-0000-1111-9999-000000000010'" |
mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -D opensim -e "delete from assets where id='00000000-0000-1111-9999-000000000011'" |
mysql -u debian-sys-maint -pvu9VYfFIcb0qcRVC -D opensim -e "delete from assets where id='00000000-0000-1111-9999-000000000012'" |
fi |
fi |
if [ -d ../clockwerk-www/ ]; then |
cd ../clockwerk-www/ |
if [ -d ../opensim-www/ ]; then |
cd ../opensim-www/ |
svn update |
dialog --yesno "This option will update the Clockwerk's OpenSim website pages. These pages are the ones that you see when logging-in to the Clockwerk and allow the web-based management of the Clockwerk. If you have made changes to the pages located in /var/www, you should make a backup and say yes. Do you want to upgrade the Clockwerk website pages?" 10 70 |
if [ $? == "0" ]; then |
echo "[Clockwerk] Updating website..." |
find /var/www/ -name \*.php -o -name \*.js -o -name \*.css -exec rm -rf '{}' \; |
cp -R * /var/www/ |
echo "[Clockwerk] Changing permissions..." |
chown -R www-data:www-data /var/www |
service apache2 restart |
service lighttpd restart |
fi |
fi |
if [ -d ../clockwerk-guacamole ]; then |
cd ../clockwerk-guacamole/ |
svn update |
echo "[Clockwerk] Updating guacamole..." |
rm -rf /var/lib/tomcat6/webapps/guacamole/* |
cp -R * /var/lib/tomcat6/webapps/guacamole/ |
chown -R tomcat6:tomcat6 /var/lib/tomcat6/webapps/guacamole |
service tomcat6 restart |
fi |
popd |
dialog --yesno "The Clockwerk uses a few shell scripts that manage the virtual machine. These tools can be found in the clockwerk-tools/lib directory and when you run this script they are updated and copied into the filesystem. A safe answer would be yes since they make-up for the core functionality of the Clockwerk. Do you want to deploy the Clockwerk tools?" 10 70 |
dialog --yesno "The Clockwerk uses a few shell scripts that manage the virtual machine. These tools can be found in the opensim-tools/lib directory and when you run this script they are updated and copied into the filesystem. A safe answer would be yes since they make-up for the core functionality of the Clockwerk. Do you want to deploy the Clockwerk tools?" 10 70 |
if [ $? == "0" ]; then |
echo "[Clockwerk] Deploying tools..." |
if [ -x lib/osstrap ]; then |