Mercurial > sat_docs
annotate scripts/launcher/launch.sh @ 77:7b848d093c3a
misc: added test sample for dotclear wiki syntax
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 17 Jan 2016 14:52:17 +0100 |
parents | fe116a11199b |
children | 4cd5475623eb |
rev | line source |
---|---|
50 | 1 #!/bin/bash |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
2 |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
3 # This is a helping script to do some tasks like installing, cleaning, starting sat and/or libervia. |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
4 |
49 | 5 # Python and resources paths |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
6 PACKAGES=/usr/local/lib/python2.7/dist-packages |
49 | 7 SHARE=/usr/local/share |
8 TMP=~/workspace/tmp_packages | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
9 |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
10 # Paths to the projects |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
11 WORKSPACE=~/workspace |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
12 SAT=$WORKSPACE/sat |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
13 PYJS=$WORKSPACE/pyjamas |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
14 LIBERVIA=$WORKSPACE/libervia |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
15 PROSODY=$WORKSPACE/prosody-hg |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
16 SATPUBSUB=$WORKSPACE/sat_pubsub |
7
b01ee1b28680
launching script handles "salut" component
souliane <souliane@mailoo.org>
parents:
6
diff
changeset
|
17 SALUT=$WORKSPACE/salut |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
18 URWID_SATEXT=$WORKSPACE/urwid_satext |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
19 |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
20 # PIDs of the processes |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
21 LOCAL_DIR=~/.local/share/sat |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
22 SAT_PID=$LOCAL_DIR/sat.pid |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
23 LIB_PID=$LOCAL_DIR/libervia.pid |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
24 SER_PID=$PROSODY/prosody.pid |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
25 SPS_PID=$SATPUBSUB/twistd.pid |
7
b01ee1b28680
launching script handles "salut" component
souliane <souliane@mailoo.org>
parents:
6
diff
changeset
|
26 SALUT_PID=$SALUT/twistd.pid |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
27 |
7
b01ee1b28680
launching script handles "salut" component
souliane <souliane@mailoo.org>
parents:
6
diff
changeset
|
28 # Connection information for Prosody components |
6
19448ad3a7d9
add big picture schema + fix launching script
souliane <souliane@mailoo.org>
parents:
3
diff
changeset
|
29 SPS_JID=sat-pubsub.tazar.int |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
30 SPS_PWD=password |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
31 |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
32 # Informations for a concurrent sat instance |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
33 # For this to work, you have to follow the instructions in: |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
34 # http://wiki.goffi.org/wiki/Howto_launch_several_S%C3%A0T_instances |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
35 # Also: |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
36 # - modify const_INT_PREFIX in the two DBus.py files |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
37 # - set DAEMON="" in the sat.sh to launch sat as a daemon |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
38 SAT_MAIN=$WORKSPACE/sat_main |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
39 SAT_MAIN_PID=~/.sat_main/sat.pid |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
40 |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
41 # 4 Firefox profiles names for testing |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
42 FF_PROFILES=(test1 test2 test3 test4) |
6
19448ad3a7d9
add big picture schema + fix launching script
souliane <souliane@mailoo.org>
parents:
3
diff
changeset
|
43 # 4 SàT profiles names for testing |
19448ad3a7d9
add big picture schema + fix launching script
souliane <souliane@mailoo.org>
parents:
3
diff
changeset
|
44 SAT_PROFILES=(pierre elisee louise buenaventura) |
40
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
18
diff
changeset
|
45 # Common profile password for these profiles |
49 | 46 SAT_PROFILES_PASSWD=xxxxxx |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
47 |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
48 # Launch sat in debug mode? |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
49 SAT_DEBUG=1 |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
50 # Launch sat pubsub in debug mode? |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
51 SPS_DEBUG=0 |
49 | 52 # Launch salut in debug mode? |
53 SALUT_DEBUG=0 | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
54 # Launch libervia in debug mode? |
49 | 55 LIB_DEBUG=1 |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
56 # Force killing processes? |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
57 KILL_FORCE=1 |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
58 |
49 | 59 |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
60 kill_process() { |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
61 # $1 is the file containing the PID to kill |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
62 if [ -f $1 ]; then |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
63 PID=`cat $1` |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
64 if ps -p $PID > /dev/null; then |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
65 if [[ $KILL_FORCE = 1 ]]; then |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
66 kill -9 $PID |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
67 else |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
68 kill -INT $PID |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
69 fi |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
70 fi |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
71 rm -f $1 |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
72 fi |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
73 } |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
74 |
49 | 75 debug_console() { |
76 PYTHONPATH=$TMP:$PYTHONPATH x-terminal-emulator -e "$@" & | |
77 } | |
78 | |
79 install() { | |
80 echo "########## Compiling prosody ##########" | |
81 cd $PROSODY && make | |
82 echo "########## Installing sat_pubsub ##########" | |
83 cd $SATPUBSUB && sudo python setup.py install | |
84 echo "############## Installing sat #############" | |
85 cd $SAT && sudo python setup.py install | |
86 echo "########### Installing libervia ###########" | |
87 cd $LIBERVIA && sudo python setup.py install | |
88 } | |
89 | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
90 stop_lib() { |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
91 echo "############ Stopping libervia ############" |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
92 libervia stop |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
93 kill_process $LIB_PID |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
94 } |
49 | 95 |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
96 stop_sat() { |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
97 echo "############### Stopping sat ##############" |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
98 sat stop |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
99 kill_process $SAT_PID |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
100 } |
49 | 101 |
102 stop_sps() { | |
103 kill_process $SPS_PID | |
104 } | |
105 | |
106 stop_salut() { | |
107 kill_process $SALUT_PID | |
108 } | |
109 | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
110 stop_ser() { |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
111 echo "############# Stopping Prosody ############" |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
112 cd $PROSODY && if [[ -f $SER_PID ]]; then ./prosodyctl stop; fi |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
113 kill_process $SER_PID |
7
b01ee1b28680
launching script handles "salut" component
souliane <souliane@mailoo.org>
parents:
6
diff
changeset
|
114 echo "####### Stopping Prosody components #######" |
49 | 115 stop_sps |
116 stop_salut | |
117 echo "####### Stopping bind9 #######" | |
118 sudo /etc/init.d/bind9 stop | |
119 | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
120 } |
49 | 121 |
122 start_sps() { | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
123 echo "########### Starting sat-pubsub ###########" |
49 | 124 cd $SATPUBSUB |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
125 if [[ $SPS_DEBUG = 1 ]]; then |
49 | 126 debug_console twistd -n -b sat_pubsub --jid=$SPS_JID --secret=$SPS_PWD |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
127 else |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
128 twistd sat_pubsub --jid=$SPS_JID --secret=$SPS_PWD |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
129 fi |
49 | 130 } |
131 | |
132 start_salut() { | |
7
b01ee1b28680
launching script handles "salut" component
souliane <souliane@mailoo.org>
parents:
6
diff
changeset
|
133 echo "############## Starting salut #############" |
49 | 134 cd $SALUT |
135 if [[ $SALUT_DEBUG = 1 ]]; then | |
136 debug_console twistd -b -y salut.tac | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
137 else |
49 | 138 twistd -y salut.tac |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
139 fi |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
140 } |
49 | 141 |
142 start_ser() { | |
143 echo "############# Starting Prosody ############" | |
144 cd $PROSODY && ./prosodyctl start & | |
145 start_sps | |
146 start_salut | |
147 echo "############## Starting bind9 #############" | |
148 sudo /etc/init.d/bind9 restart | |
149 } | |
150 | |
151 start_sat() { | |
152 echo "############### Starting sat ##############" | |
153 cd $SAT/src | |
154 if [[ $SAT_DEBUG = 1 ]]; then | |
155 debug_console ./sat.sh debug | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
156 else |
49 | 157 ./sat.sh |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
158 fi |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
159 } |
49 | 160 |
161 start_lib() { | |
162 echo "############ Starting libervia ############" | |
163 cd $LIBERVIA/src/browser | |
164 pyjsbuild libervia_main -d --no-compile-inplace --platforms=mozilla -I $TMP -o $LIBERVIA/html | |
165 cd $LIBERVIA/src | |
166 if [[ $LIB_DEBUG = 1 ]]; then | |
167 debug_console ./libervia.sh debug | |
168 else | |
169 ./libervia.sh | |
170 fi | |
171 } | |
172 | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
173 4foxes() { |
6
19448ad3a7d9
add big picture schema + fix launching script
souliane <souliane@mailoo.org>
parents:
3
diff
changeset
|
174 # Starts 4 instances of firefox and connect SàT profiles with Libervia |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
175 # Assumes the HTTPS port for local server is 8443 |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
176 echo "####### Starting 4 libervia clients #######" |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
177 for I in `seq 0 3`; do |
40
1eb3ec190ea1
add test_accounts to create a batch of testing profiles
souliane <souliane@mailoo.org>
parents:
18
diff
changeset
|
178 URL="https://localhost:8443/libervia.html?login=${SAT_PROFILES[$I]}&passwd=${SAT_PROFILES_PASSWD}" |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
179 firefox -no-remote -P ${FF_PROFILES[$I]} "$URL" & |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
180 done |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
181 } |
49 | 182 |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
183 clean() { |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
184 echo "############ Cleaning log files ###########" |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
185 rm -f $LOCAL_DIR/*.log* |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
186 rm -f $SATPUBSUB/twistd.log* |
49 | 187 rm -f $SALUT/twistd.log* |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
188 rm -f $PROSODY/prosody.log* $PROSODY/prosody.err* |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
189 } |
49 | 190 |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
191 purge() { |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
192 echo "######## Purging installed packages #######" |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
193 rm -rf $PACKAGES/sat |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
194 rm -rf $PACKAGES/sat_frontends |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
195 rm -rf $PACKAGES/libervia |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
196 rm -rf $PACKAGES/libervia_server |
49 | 197 rm -rf $SHARE/libervia |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
198 } |
49 | 199 |
200 sat_main() { | |
6
19448ad3a7d9
add big picture schema + fix launching script
souliane <souliane@mailoo.org>
parents:
3
diff
changeset
|
201 echo "######## Starting SàT main instance #######" |
49 | 202 cd $SAT_MAIN/lib/sat && hg pull -u && PYTHONPATH=$SAT_MAIN/lib:$PYTHONPATH ./sat.sh |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
203 echo "#### Starting primitivus main instance ####" |
49 | 204 cd $SAT_MAIN/lib/sat_frontends/primitivus && PYTHONPATH=$SAT_MAIN/lib:$PYTHONPATH ./primitivus -p souliane |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
205 } |
49 | 206 |
207 primitivus_main() { | |
208 echo "#### Starting primitivus main instance ####" | |
209 cd $SAT_MAIN/lib/sat_frontends/primitivus && PYTHONPATH=$SAT_MAIN/lib:$PYTHONPATH ./primitivus | |
210 } | |
211 | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
212 bridge() { |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
213 echo "######### Generating DBus.py files ########" |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
214 cd $SAT/src/bridge/bridge_constructor |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
215 ./bridge_constructor.py --force && cp generated/DBus.py ../DBus.py |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
216 ./bridge_constructor.py -s frontend --force && cp generated/DBus.py ../../../frontends/src/bridge/DBus.py |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
217 cd $SAT_MAIN/src/bridge/bridge_constructor |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
218 SAT_BRIDGE_CONST_INT_PREFIX='"org.goffi.sat_main"' ./bridge_constructor.py --force && cp generated/DBus.py ../DBus.py |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
219 SAT_BRIDGE_CONST_INT_PREFIX='"org.goffi.sat_main"' ./bridge_constructor.py -s frontend --force && cp generated/DBus.py ../../../frontends/src/bridge/DBus.py |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
220 } |
49 | 221 |
18
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
222 monitor_core() { |
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
223 echo "## Monitoring DBus for SàT dev instance - core ##" |
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
224 dbus-monitor "sender='org.goffi.SAT', interface='org.goffi.SAT.core'" |
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
225 } |
49 | 226 |
18
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
227 monitor_plugin() { |
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
228 echo "## Monitoring DBus for SàT dev instance - plugin ##" |
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
229 dbus-monitor "sender='org.goffi.SAT', interface='org.goffi.SAT.plugin'" |
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
230 } |
49 | 231 |
18
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
232 monitor_main() { |
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
233 echo "## Monitoring DBus for SàT main instance (redirected to /tmp/...) ##" |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
234 killall -q dbus-monitor |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
235 nohup dbus-monitor "sender='org.goffi.sat_main', interface='org.goffi.sat_main.core'" >> /tmp/sat_xml_core_`date +%y.%m.%d`& |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
236 nohup dbus-monitor "sender='org.goffi.sat_main', interface='org.goffi.sat_main.plugin'" >> /tmp/sat_xml_plugin_`date +%y.%m.%d`& |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
237 } |
49 | 238 |
239 link_pkgs() { | |
240 echo "## Linking temporary packages directory ##" | |
241 rm -f $TMP/* # avoid to create symlinks like $TMP/sat/src | |
242 mkdir -p $TMP | |
243 ln -s $SAT/src $TMP/sat | |
244 ln -s $SAT/frontends/src $TMP/sat_frontends | |
245 ln -s $LIBERVIA/src $TMP/libervia | |
246 ln -s $WORKSPACE/urwid_satext/urwid_satext $TMP/urwid_satext | |
247 } | |
248 | |
249 echo "using temporary directory $TMP" | |
250 export PYTHONPATH=$TMP:$PYTHONPATH | |
251 | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
252 case "$1" in |
49 | 253 install) install ;; |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
254 stop_lib) stop_lib ;; |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
255 stop_sat) stop_sat ;; |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
256 stop_ser) stop_ser ;; |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
257 start_ser) start_ser ;; |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
258 start_sat) start_sat ;; |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
259 start_lib) start_lib ;; |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
260 stop) stop_lib && stop_sat && stop_ser ;; |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
261 start) start_ser && start_sat && start_lib;; |
49 | 262 restart_ser) stop_ser && start_ser ;; |
263 restart_sat) stop_sat && start_sat ;; | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
264 restart_lib) stop_lib && start_lib ;; |
49 | 265 restart_all) |
266 stop_lib && stop_sat && stop_ser && clean | |
267 start_ser && start_sat && start_lib;; | |
268 restart_sps) stop_sps && start_sps;; | |
269 restart_salut) stop_salut && start_salut ;; | |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
270 4foxes) 4foxes ;; |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
271 clean) clean ;; |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
272 purge) clean && purge;; |
49 | 273 main) sat_main ;; |
274 primitivus_main) primitivus_main ;; | |
18
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
275 bridge) bridge ;; |
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
276 monitor_core) monitor_core ;; |
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
277 monitor_plugin) monitor_plugin ;; |
7b337be4052d
updated launcher helping script
souliane <souliane@mailoo.org>
parents:
7
diff
changeset
|
278 monitor_main) monitor_main ;; |
49 | 279 link_pkgs) link_pkgs ;; |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
280 *) |
49 | 281 echo "Please specify a valid command." |
2
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
282 esac |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
283 |
3ec5808e3b53
added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
284 echo "Done." |