opensim-tools – Diff between revs 24 and 28

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 24 Rev 28
Line 3... Line 3...
3 ## Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 ## 3 ## Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 ##
4 ## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ## 4 ## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ##
5 ## rights of fair usage, the disclaimer and warranty conditions. ## 5 ## rights of fair usage, the disclaimer and warranty conditions. ##
6 ########################################################################### 6 ###########################################################################
Line -... Line 7...
-   7  
-   8 dialog --msgbox "This tool will upgrade the Spectacled Owl machine." 10 70
7   9  
8 pushd ./ 10 pushd ./
9 if [ -d ../opensim-sources ]; then 11 if [ -d ../opensim-sources/ ]; then
10 cd ../opensim-sources/ 12 cd ../opensim-sources/
11 echo "[SpectacledOwl] Updating sources..." 13 echo "[SpectacledOwl] Updating sources..."
-   14 svn update
-   15 dialog --yesno "By slecting 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
12 svn update 16 if [ ?$ == "0" ]; then
13 echo "[SpectacledOwl] Cleaning..." 17 echo "[SpectacledOwl] Cleaning..."
14 PKG_CONFIG_PATH=/opt/mono-4-0/lib/pkgconfig make clean 18 PKG_CONFIG_PATH=/opt/mono-4-0/lib/pkgconfig make clean
15 echo "[SpectacledOwl] Build..." 19 echo "[SpectacledOwl] Build..."
16 PKG_CONFIG_PATH=/opt/mono-4-0/lib/pkgconfig make 20 PKG_CONFIG_PATH=/opt/mono-4-0/lib/pkgconfig make
17 if [ -d /home/opensim/os ]; then 21 if [ -d /home/opensim/os ]; then
18 echo "[SpectacledOwl] Copying files..." 22 echo "[SpectacledOwl] Copying files..."
19 mkdir -p /home/opensim/os 23 mkdir -p /home/opensim/os
20 find bin/ -name \*.ini -exec rm -rf '{}' \; 24 find bin/ -name \*.ini -exec rm -rf '{}' \;
21 find bin/ -name \*.config -exec rm -rf '{}' \; 25 find bin/ -name \*.config -exec rm -rf '{}' \;
22 cp -Ra bin/* /home/opensim/os/ 26 cp -Ra bin/* /home/opensim/os/
23 echo "[SpectacledOwl] Changing ownership..." 27 echo "[SpectacledOwl] Changing ownership..."
24 chown -R opensim:opensim /home/opensim/os/ 28 chown -R opensim:opensim /home/opensim/os/
25 fi 29 fi
26 fi 30 fi
27 if [ -d ../opensim-config ]; then -  
28 echo "[SpectacledOwl] Updating configuration..." 31 if [ -d ../opensim-config/ ]; then
29 cd ../opensim-config/ 32 cd ../opensim-config/
-   33 svn update
-   34 dialog --yesno "This option will update OpenSim's configuration files EXCEPT Regions.ini which will not be touched. 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?" 10 70
-   35 if [ $? == "0" ]; then
30 svn update 36 echo "[SpectacledOwl] Updating configuration..."
-   37 cp -Ra * /home/opensim/os/
31 cp -Ra * /home/opensim/os/ 38 fi
32 fi 39 fi
33 if [ -d /var/opensim-www ]; then -  
34 echo "[SpectacledOwl] Updating website..." 40 if [ -d ../opensim-www/ ]; then
35 cd /var/opensim-www/ 41 cd ../opensim-www/
-   42 svn update
-   43 dialog --yesno "This option will update the Spectacled Owl's OpenSim website pages. These pages are the ones that you see when logging-in to the Spectacled Owl and allow the web-based management of the Spectacled Owl. If you have made changes to the pages located in /var/opensim-www, you should make a backup and say yes. Do you want to upgrade the Spectacled Owl website pages?" 10 70
-   44 if [ $? == "0"]; then
-   45 echo "[SpectacledOwl] Updating website..."
36 svn update 46 cp -R * /var/www/
37 chown -R www-data:www-data /var/opensim-www 47 chown -R www-data:www-data /var/opensim-www
-   48 service lighttpd restart
38 service lighttpd restart 49 fi
39 fi 50 fi
-   51 popd
-   52 dialog --yesno "The Spectacled Owl 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 Spectacled Owl. Do you want to deploy the Spectacled Owl tools?" 10 70
40 popd 53 if [ $? == "0" ]; then
41 echo "[SpectacledOwl] Deploying tools..." 54 echo "[SpectacledOwl] Deploying tools..."
42 if [ -x lib/osstrap ]; then 55 if [ -x lib/osstrap ]; then
43 cp lib/osstrap /etc/init.d/osstrap 56 cp lib/osstrap /etc/init.d/osstrap
44 fi 57 fi
45 if [ -x lib/iardumper ]; then 58 if [ -x lib/iardumper ]; then
-   59 cp lib/iardumper /etc/cron.daily/iardumper
46 cp lib/iardumper /etc/cron.daily/iardumper 60 fi
47 fi 61 fi
48 echo "[SpectacledOwl] Applying firewall..." 62 dialog --yesno "Apply the latest firewall changes? The firewall rules can be found in the opensim-tools/lib/firewall file and consist of a rudiementary set of protections for the Spectacled Owl. If you have made changes to ports and are now managing the firewall by yourself, the safe choice is no. Otherwise, please select yes." 10 70
-   63 if [ -x lib/firewall ] && [ $? == "0" ]; then
49 if [ -x lib/firewall ]; then 64 echo "[SpectacledOwl] Applying firewall..."
50 lib/firewall 65 lib/firewall
51 fi 66 fi
52 echo "[SpectacledOwl] Restarting SpectacledOwl." 67 echo "[SpectacledOwl] Restarting SpectacledOwl."
53 kill -s HUP `pidof mono` 68 kill -s HUP `pidof mono`