forked from tomgalloway/FreedomBuddy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
executable file
·49 lines (38 loc) · 1.15 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#! /bin/sh
# -*- mode: sh; mode: auto-fill; fill-column: 80 -*-
cd src
PYTHONPATH=$PYTHONPATH:../../..
PYTHONPATH=$PYTHONPATH:../build/gnupg
PYTHONPATH=$PYTHONPATH:../build/plinth
PYTHONPATH=$PYTHONPATH:../build/bjsonrpc
export PYTHONPATH
if [ "$1" -eq "1" ]
then
# start santiago
python santiago_test.py "$@"
elif [ "$1" -eq "2" ]
then
# supply the cli controller any action.
python connectors/cli/controller.py "$@"
elif [ "$1" -eq "3" ]
then
# supply the cli controller any action.
python connectors/https/controller.py "--listen"
elif [ "$1" -eq "4" ]
then
# give the https controller any action.
python connectors/https/controller.py "--monitor"
elif [ "$1" -eq "5" ]
then
# do EVERYTHING in multiple terminals.
# start fbuddy + cli client
lxterm -e "python santiago_test.py" &
# start https client
lxterm -e "python connectors/https/controller.py --listen" &
lxterm -e "python connectors/https/controller.py --monitor" &
# start a browser for the monitor
lxterm -e "sleep 5 && x-www-browser https://127.0.0.1:8081/freedombuddy" &
echo "Press return to quit."
read X
killall python
fi