Mercurial > sat_docs
comparison scripts/launcher/launch.sh @ 6:19448ad3a7d9
add big picture schema + fix launching script
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 16 Jul 2014 12:29:22 +0200 |
parents | 73d3b94b7364 |
children | b01ee1b28680 |
comparison
equal
deleted
inserted
replaced
5:dfc5c6be7761 | 6:19448ad3a7d9 |
---|---|
20 LIB_PID=$LOCAL_DIR/libervia.pid | 20 LIB_PID=$LOCAL_DIR/libervia.pid |
21 SER_PID=$PROSODY/prosody.pid | 21 SER_PID=$PROSODY/prosody.pid |
22 SPS_PID=$SATPUBSUB/twistd.pid | 22 SPS_PID=$SATPUBSUB/twistd.pid |
23 | 23 |
24 # Connection information for sat_pubsub | 24 # Connection information for sat_pubsub |
25 SPS_JID=sat-pubsub.souliane.org | 25 SPS_JID=sat-pubsub.tazar.int |
26 SPS_PWD=password | 26 SPS_PWD=password |
27 | 27 |
28 # Informations for a concurrent sat instance | 28 # Informations for a concurrent sat instance |
29 # For this to work, you have to follow the instructions in: | 29 # For this to work, you have to follow the instructions in: |
30 # http://wiki.goffi.org/wiki/Howto_launch_several_S%C3%A0T_instances | 30 # http://wiki.goffi.org/wiki/Howto_launch_several_S%C3%A0T_instances |
34 SAT_MAIN=$WORKSPACE/sat_main | 34 SAT_MAIN=$WORKSPACE/sat_main |
35 SAT_MAIN_PID=~/.sat_main/sat.pid | 35 SAT_MAIN_PID=~/.sat_main/sat.pid |
36 | 36 |
37 # 4 Firefox profiles names for testing | 37 # 4 Firefox profiles names for testing |
38 FF_PROFILES=(test1 test2 test3 test4) | 38 FF_PROFILES=(test1 test2 test3 test4) |
39 # 4 SàT profiles names for testing | 39 # 4 SÃ T profiles names for testing |
40 SAT_PROFILES=(Peter Steven Dave Dino) | 40 SAT_PROFILES=(pierre elisee louise buenaventura) |
41 # Passwords for these profiles | 41 # Passwords for these profiles |
42 SAT_PROFILES_PASSWD=(xxxxxx xxxxxx xxxxxx xxxxxx) | 42 SAT_PROFILES_PASSWD=(xxxxxx xxxxxx xxxxxx xxxxxx) |
43 | 43 |
44 # Launch sat in debug mode? | 44 # Launch sat in debug mode? |
45 SAT_DEBUG=1 | 45 SAT_DEBUG=1 |
46 # Launch sat pubsub in debug mode? | 46 # Launch sat pubsub in debug mode? |
47 SPS_DEBUG=0 | 47 SPS_DEBUG=0 |
48 # Launch libervia in debug mode? | 48 # Launch libervia in debug mode? |
49 LIB_DEBUG=1 | 49 LIB_DEBUG=0 |
50 # Force killing processes? | 50 # Force killing processes? |
51 KILL_FORCE=1 | 51 KILL_FORCE=1 |
52 | 52 |
53 kill_process() { | 53 kill_process() { |
54 # $1 is the file containing the PID to kill | 54 # $1 is the file containing the PID to kill |
114 else | 114 else |
115 libervia | 115 libervia |
116 fi | 116 fi |
117 } | 117 } |
118 4foxes() { | 118 4foxes() { |
119 # Starts 4 instances of firefox and connect SàT profiles with Libervia | 119 # Starts 4 instances of firefox and connect SÃ T profiles with Libervia |
120 # Assumes the HTTPS port for local server is 8443 | 120 # Assumes the HTTPS port for local server is 8443 |
121 echo "####### Starting 4 libervia clients #######" | 121 echo "####### Starting 4 libervia clients #######" |
122 for I in `seq 0 3`; do | 122 for I in `seq 0 3`; do |
123 URL="https://localhost:8443/libervia.html?login=${SAT_PROFILES[$I]}&passwd=${SAT_PROFILES_PASSWD[$I]}" | 123 URL="https://localhost:8443/libervia.html?login=${SAT_PROFILES[$I]}&passwd=${SAT_PROFILES_PASSWD[$I]}" |
124 firefox -no-remote -P ${FF_PROFILES[$I]} "$URL" & | 124 firefox -no-remote -P ${FF_PROFILES[$I]} "$URL" & |
136 rm -rf $PACKAGES/sat_frontends | 136 rm -rf $PACKAGES/sat_frontends |
137 rm -rf $PACKAGES/libervia | 137 rm -rf $PACKAGES/libervia |
138 rm -rf $PACKAGES/libervia_server | 138 rm -rf $PACKAGES/libervia_server |
139 } | 139 } |
140 main() { | 140 main() { |
141 echo "######## Starting SàT main instance #######" | 141 echo "######## Starting SÃ T main instance #######" |
142 export PYTHONPATH=$SAT_MAIN/lib | 142 export PYTHONPATH=$SAT_MAIN/lib |
143 cd $SAT_MAIN/lib/sat && hg pull -u && ./sat.sh | 143 cd $SAT_MAIN/lib/sat && hg pull -u && ./sat.sh |
144 echo "#### Starting primitivus main instance ####" | 144 echo "#### Starting primitivus main instance ####" |
145 cd $SAT_MAIN/lib/sat_frontends/primitivus && ./primitivus | 145 cd $SAT_MAIN/lib/sat_frontends/primitivus && ./primitivus |
146 } | 146 } |
152 cd $SAT_MAIN/src/bridge/bridge_constructor | 152 cd $SAT_MAIN/src/bridge/bridge_constructor |
153 SAT_BRIDGE_CONST_INT_PREFIX='"org.goffi.sat_main"' ./bridge_constructor.py --force && cp generated/DBus.py ../DBus.py | 153 SAT_BRIDGE_CONST_INT_PREFIX='"org.goffi.sat_main"' ./bridge_constructor.py --force && cp generated/DBus.py ../DBus.py |
154 SAT_BRIDGE_CONST_INT_PREFIX='"org.goffi.sat_main"' ./bridge_constructor.py -s frontend --force && cp generated/DBus.py ../../../frontends/src/bridge/DBus.py | 154 SAT_BRIDGE_CONST_INT_PREFIX='"org.goffi.sat_main"' ./bridge_constructor.py -s frontend --force && cp generated/DBus.py ../../../frontends/src/bridge/DBus.py |
155 } | 155 } |
156 monitor() { | 156 monitor() { |
157 echo "## Monitoring DBus for SàT main instance ##" | 157 echo "## Monitoring DBus for SÃ T main instance ##" |
158 killall -q dbus-monitor | 158 killall -q dbus-monitor |
159 nohup dbus-monitor "sender='org.goffi.sat_main', interface='org.goffi.sat_main.core'" >> /tmp/sat_xml_core_`date +%y.%m.%d`& | 159 nohup dbus-monitor "sender='org.goffi.sat_main', interface='org.goffi.sat_main.core'" >> /tmp/sat_xml_core_`date +%y.%m.%d`& |
160 nohup dbus-monitor "sender='org.goffi.sat_main', interface='org.goffi.sat_main.plugin'" >> /tmp/sat_xml_plugin_`date +%y.%m.%d`& | 160 nohup dbus-monitor "sender='org.goffi.sat_main', interface='org.goffi.sat_main.plugin'" >> /tmp/sat_xml_plugin_`date +%y.%m.%d`& |
161 } | 161 } |
162 case "$1" in | 162 case "$1" in |