forked from NAMD/pypln.backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_development_environment.sh
executable file
·51 lines (43 loc) · 1.65 KB
/
start_development_environment.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
50
51
#!/bin/bash
#
# Copyright 2012 NAMD-EMAP-FGV
#
# This file is part of PyPLN. You can get more information at: http://pypln.org/.
#
# PyPLN is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PyPLN is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PyPLN. If not, see <http://www.gnu.org/licenses/>.
SCRIPT_PATH=$(dirname $(readlink -f $0))/../ # get parent directory
# Adding the current directory to PYTHONPATH, the broker will be able to import
# pypln.backend even if the package is not installed
export PYTHONPATH="$SCRIPT_PATH:$PYTHONPATH"
echo "+-------------------------------------------------------+"
echo "| This script is intended for development only. |"
echo "| Please do not use it to run a production environment. |"
echo "+-------------------------------------------------------+"
echo "Starting router..."
"$SCRIPT_PATH/pypln/backend/router.py" &
ROUTER_PID=$!
echo "Router has PID $ROUTER_PID"
echo "Starting pipeliner..."
"$SCRIPT_PATH/pypln/backend/pipeliner.py" &
PIPELINER_PID=$!
echo "Pipeliner has PID $PIPELINER_PID"
echo "Starting broker..."
"$SCRIPT_PATH/pypln/backend/broker.py" &
BROKER_PID=$!
echo "Broker has PID $BROKER_PID"
trap "kill 0; exit" SIGINT SIGTERM SIGKILL
while :
do
sleep 1
done