opensim-tools – Diff between revs 44 and 45

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 44 Rev 45
Line 12... Line 12...
12 dialog --msgbox "This tool will configure the Spectacled Owl." 10 70 12 dialog --msgbox "This tool will configure the Spectacled Owl." 10 70
Line 13... Line 13...
13   13  
14 # Set hostname 14 # Set hostname
15 HOSTNAME=`cat /etc/hostname` 15 HOSTNAME=`cat /etc/hostname`
16 TMP=`date +%s | sha1sum | awk '{ print $1 }'` 16 TMP=`date +%s | sha1sum | awk '{ print $1 }'`
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 $VIVOX_USER 2> $TMP 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
18 if [ $? == "0" ]; then 18 if [ $? == "0" ]; then
19 cat $TMP > /etc/hostname 19 cat $TMP > /etc/hostname
20 fi 20 fi
21 rm $TMP 21 rm $TMP 2>/dev/null
22 # Set Vivox 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 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 24 if [ $? == "0" ]; then
25 USERNAME=`cat OpenSim.ini | grep vivox_admin_user | awk -F"[ \t]*[=][ \t]*" '{ print $2 }'` 25 USERNAME=`cat OpenSim.ini | grep vivox_admin_user | awk -F"[ \t]*[=][ \t]*" '{ print $2 }'`
Line 28... Line 28...
28 if [ $? == "0" ]; then 28 if [ $? == "0" ]; then
29 USERNAME=`cat $TMP` 29 USERNAME=`cat $TMP`
30 sed -i "s/vivox_admin_user *=.*/vivox_admin_user = $USERNAME/g" \ 30 sed -i "s/vivox_admin_user *=.*/vivox_admin_user = $USERNAME/g" \
31 OpenSim.ini; 31 OpenSim.ini;
32 fi 32 fi
33 rm $TMP 33 rm $TMP 2>/dev/null
34 PASSWORD=`cat OpenSim.ini | grep vivox_admin_password | awk -F"[ \t]*[=][ \t]*" '{ print $2 }'` 34 PASSWORD=`cat OpenSim.ini | grep vivox_admin_password | awk -F"[ \t]*[=][ \t]*" '{ print $2 }'`
35 TMP=`date +%s | sha1sum | awk '{ print $1 }'` 35 TMP=`date +%s | sha1sum | awk '{ print $1 }'`
36 dialog --inputbox "Please enter your Vivox admin passsword: " 10 70 $PASS 2> $TMP 36 dialog --inputbox "Please enter your Vivox admin passsword: " 10 70 $PASS 2> $TMP
37 if [ $? == "0" ]; then 37 if [ $? == "0" ]; then
38 PASSWORD=`cat $TMP` 38 PASSWORD=`cat $TMP`
39 sed -i "s/vivox_admin_password *=.*/vivox_admin_password = $PASSWORD/g" \ 39 sed -i "s/vivox_admin_password *=.*/vivox_admin_password = $PASSWORD/g" \
40 OpenSim.ini; 40 OpenSim.ini;
41 fi 41 fi
42 rm $TMP 42 rm $TMP 2>/dev/null
43 fi 43 fi
44 rm $TMP 44 rm $TMP 2>/dev/null
45 popd 45 popd