opensim-tools – Blame information for rev 47

Subversion Repositories:
Rev:
Rev Author Line No. Line
44 eva 1 #!/bin/bash
2 ###########################################################################
3 ## Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3 ##
4 ## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ##
5 ## rights of fair usage, the disclaimer and warranty conditions. ##
6 ###########################################################################
7  
8 OPENSIM_PATH=/home/opensim/os/
9 pushd ./
10 cd $OPENSIM_PATH
11  
12 dialog --msgbox "This tool will configure the Spectacled Owl." 10 70
13  
14 # Set hostname
15 HOSTNAME=`cat /etc/hostname`
16 TMP=`date +%s | sha1sum | awk '{ print $1 }'`
45 eva 17 dialog --inputbox "The Spectacled Owl uses IP addresses during its boot cycle. This option allows you to override the IP address with a hostname. If you do have an externally reachable fully-qualified hostname, please enter it here: " 10 70 $HOSTNAME 2> $TMP
44 eva 18 if [ $? == "0" ]; then
19 cat $TMP > /etc/hostname
20 fi
45 eva 21 rm $TMP 2>/dev/null
44 eva 22 # Set Vivox
23 dialog --yesno "The Spectacled Owl can be configured to support voice via Vivox (http://support.vivox.com/opensim/). If you wish to configure voice, you need to visit the Vivox website and request a username and a password. if you have received the settings from Vivox, would you like to configure voice now?" 10 70
24 if [ $? == "0" ]; then
25 USERNAME=`cat OpenSim.ini | grep vivox_admin_user | awk -F"[ \t]*[=][ \t]*" '{ print $2 }'`
46 eva 26 if [ ! -z $USERNAME ]; then
27 TMP=`date +%s | sha1sum | awk '{ print $1 }'`
47 eva 28 dialog --inputbox "Please enter your Vivox admin user: " 10 70 $USERNAME 2> $TMP
46 eva 29 if [ $? == "0" ]; then
30 USERNAME=`cat $TMP`
31 sed -i "s/vivox_admin_user *=.*/vivox_admin_user = $USERNAME/g" \
32 OpenSim.ini;
33 fi
34 rm $TMP 2>/dev/null
44 eva 35 fi
36 PASSWORD=`cat OpenSim.ini | grep vivox_admin_password | awk -F"[ \t]*[=][ \t]*" '{ print $2 }'`
46 eva 37 if [ ! -z $PASSWORD ]; then
38 TMP=`date +%s | sha1sum | awk '{ print $1 }'`
47 eva 39 dialog --inputbox "Please enter your Vivox admin passsword: " 10 70 $PASSWORD 2> $TMP
46 eva 40 if [ $? == "0" ]; then
41 PASSWORD=`cat $TMP`
42 sed -i "s/vivox_admin_password *=.*/vivox_admin_password = $PASSWORD/g" \
43 OpenSim.ini;
44 fi
45 rm $TMP 2>/dev/null
44 eva 46 fi
47 fi
45 eva 48 rm $TMP 2>/dev/null
44 eva 49 popd