annotate scripts/launcher/launch.sh @ 3:73d3b94b7364

added DNS SRV configuration script + move launching script to scripts/launcher/launch.sh
author souliane <souliane@mailoo.org>
date Fri, 27 Jun 2014 19:17:18 +0200
parents scripts/launch.sh@3ec5808e3b53
children 19448ad3a7d9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
1 #!/bin/bash
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
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
5 # Python dist-packages where project are installed
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
6 PACKAGES=/usr/local/lib/python2.7/dist-packages
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
7
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
8 # Paths to the projects
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
9 WORKSPACE=~/workspace
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
10 SAT=$WORKSPACE/sat
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
11 PYJS=$WORKSPACE/pyjamas
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
12 LIBERVIA=$WORKSPACE/libervia
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
13 PROSODY=$WORKSPACE/prosody-hg
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
14 SATPUBSUB=$WORKSPACE/sat_pubsub
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
15 URWID_SATEXT=$WORKSPACE/urwid_satext
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
16
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
17 # PIDs of the processes
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
18 LOCAL_DIR=~/.local/share/sat
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
19 SAT_PID=$LOCAL_DIR/sat.pid
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
20 LIB_PID=$LOCAL_DIR/libervia.pid
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
21 SER_PID=$PROSODY/prosody.pid
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
22 SPS_PID=$SATPUBSUB/twistd.pid
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
23
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
24 # Connection information for sat_pubsub
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
25 SPS_JID=sat-pubsub.souliane.org
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
26 SPS_PWD=password
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
27
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
28 # Informations for a concurrent sat instance
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
29 # For this to work, you have to follow the instructions in:
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
30 # http://wiki.goffi.org/wiki/Howto_launch_several_S%C3%A0T_instances
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
31 # Also:
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
32 # - modify const_INT_PREFIX in the two DBus.py files
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
33 # - set DAEMON="" in the sat.sh to launch sat as a daemon
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
34 SAT_MAIN=$WORKSPACE/sat_main
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
35 SAT_MAIN_PID=~/.sat_main/sat.pid
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
36
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
37 # 4 Firefox profiles names for testing
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
38 FF_PROFILES=(test1 test2 test3 test4)
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
39 # 4 S�T profiles names for testing
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
40 SAT_PROFILES=(Peter Steven Dave Dino)
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
41 # Passwords for these profiles
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
42 SAT_PROFILES_PASSWD=(xxxxxx xxxxxx xxxxxx xxxxxx)
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
43
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
44 # Launch sat in debug mode?
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
45 SAT_DEBUG=1
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
46 # Launch sat pubsub in debug mode?
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
47 SPS_DEBUG=0
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
48 # Launch libervia in debug mode?
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
49 LIB_DEBUG=1
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
50 # Force killing processes?
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
51 KILL_FORCE=1
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
52
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
53 kill_process() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
54 # $1 is the file containing the PID to kill
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
55 if [ -f $1 ]; then
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
56 PID=`cat $1`
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
57 if ps -p $PID > /dev/null; then
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
58 if [[ $KILL_FORCE = 1 ]]; then
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
59 kill -9 $PID
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
60 else
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
61 kill -INT $PID
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
62 fi
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
63 fi
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
64 rm -f $1
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
65 fi
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
66 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
67
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
68 stop_lib() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
69 echo "############ Stopping libervia ############"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
70 libervia stop
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
71 kill_process $LIB_PID
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
72 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
73 stop_sat() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
74 echo "############### Stopping sat ##############"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
75 sat stop
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
76 kill_process $SAT_PID
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
77 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
78 stop_ser() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
79 echo "############# Stopping Prosody ############"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
80 cd $PROSODY && if [[ -f $SER_PID ]]; then ./prosodyctl stop; fi
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
81 kill_process $SER_PID
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
82 echo "########### Stopping sat_pubsub ###########"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
83 kill_process $SPS_PID
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
84 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
85 start_ser() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
86 echo "############# Starting Prosody ############"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
87 cd $PROSODY && ./prosodyctl start
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
88 echo "########## Installing sat_pubsub ##########"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
89 cd $SATPUBSUB && sudo python setup.py install
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
90 echo "########### Starting sat-pubsub ###########"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
91 if [[ $SPS_DEBUG = 1 ]]; then
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
92 mate-terminal -e "twistd -n -b sat_pubsub --jid=$SPS_JID --secret=$SPS_PWD" &
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
93 else
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
94 twistd sat_pubsub --jid=$SPS_JID --secret=$SPS_PWD
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
95 fi
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
96 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
97 start_sat() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
98 echo "############## Installing sat #############"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
99 cd $SAT && sudo python setup.py install
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
100 echo "############### Starting sat ##############"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
101 if [[ $SAT_DEBUG = 1 ]]; then
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
102 mate-terminal -e "sat debug" &
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
103 else
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
104 sat
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
105 fi
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
106 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
107 start_lib() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
108 echo "########### Installing libervia ###########"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
109 cd $LIBERVIA && sudo python setup.py install
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
110 echo "############ Starting libervia ############"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
111 cd src
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
112 if [[ $LIB_DEBUG = 1 ]]; then
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
113 mate-terminal -e "libervia debug" &
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
114 else
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
115 libervia
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
116 fi
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
117 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
118 4foxes() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
119 # Starts 4 instances of firefox and connect S�T profiles with Libervia
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
120 # Assumes the HTTPS port for local server is 8443
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
121 echo "####### Starting 4 libervia clients #######"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
122 for I in `seq 0 3`; do
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
123 URL="https://localhost:8443/libervia.html?login=${SAT_PROFILES[$I]}&passwd=${SAT_PROFILES_PASSWD[$I]}"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
124 firefox -no-remote -P ${FF_PROFILES[$I]} "$URL" &
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
125 done
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
126 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
127 clean() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
128 echo "############ Cleaning log files ###########"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
129 rm -f $LOCAL_DIR/*.log*
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
130 rm -f $SATPUBSUB/twistd.log*
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
131 rm -f $PROSODY/prosody.log* $PROSODY/prosody.err*
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
132 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
133 purge() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
134 echo "######## Purging installed packages #######"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
135 rm -rf $PACKAGES/sat
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
136 rm -rf $PACKAGES/sat_frontends
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
137 rm -rf $PACKAGES/libervia
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
138 rm -rf $PACKAGES/libervia_server
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
139 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
140 main() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
141 echo "######## Starting S�T main instance #######"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
142 export PYTHONPATH=$SAT_MAIN/lib
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
143 cd $SAT_MAIN/lib/sat && hg pull -u && ./sat.sh
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
144 echo "#### Starting primitivus main instance ####"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
145 cd $SAT_MAIN/lib/sat_frontends/primitivus && ./primitivus
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
146 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
147 bridge() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
148 echo "######### Generating DBus.py files ########"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
149 cd $SAT/src/bridge/bridge_constructor
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
150 ./bridge_constructor.py --force && cp generated/DBus.py ../DBus.py
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
151 ./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
152 cd $SAT_MAIN/src/bridge/bridge_constructor
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
153 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
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
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
155 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
156 monitor() {
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
157 echo "## Monitoring DBus for S�T main instance ##"
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
158 killall -q dbus-monitor
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
159 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
160 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
161 }
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
162 case "$1" in
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
163 stop_lib) stop_lib ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
164 stop_sat) stop_sat ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
165 stop_ser) stop_ser ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
166 start_ser) start_ser ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
167 start_sat) start_sat ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
168 start_lib) start_lib ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
169 stop) stop_lib && stop_sat && stop_ser ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
170 start) start_ser && start_sat && start_lib;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
171 restart_sat) stop_sat && stop_ser && start_ser && start_sat ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
172 restart_lib) stop_lib && start_lib ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
173 4foxes) 4foxes ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
174 clean) clean ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
175 purge) clean && purge;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
176 main) main ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
177 bridge) bridge;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
178 monitor) monitor;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
179 *)
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
180 # default: reinstall and restart all
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
181 stop_lib && stop_sat && stop_ser
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
182 clean
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
183 start_ser && start_sat && start_lib
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
184 ;;
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
185 esac
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
186
3ec5808e3b53 added screenshots + launching script
souliane <souliane@mailoo.org>
parents:
diff changeset
187 echo "Done."