-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstart.sh
executable file
·73 lines (62 loc) · 1.9 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh
#. triplewave.properties
echo " _____ _ _ __ __ "
echo " |_ _| _(_)_ __| |__\ \ / /_ ___ _____ "
echo " | || '_| | '_ \ / -_) \/\/ / _\` \ V / -_)"
echo " |_||_| |_| .__/_\___|\_/\_/\__,_|\_/\___|"
echo " |_| "
echo
echo " http://streamreasoning.github.io/TripleWave"
echo
while [[ "$#" > 1 ]]; do case $1 in
--configuration) configuration="$2";;
*) break;;
esac; shift; shift
done
if [ -z "$configuration" ]; then
configuration="config/config.properties"
fi
echo "Looking for the configuration file ${configuration}"
echo "Reading the configuration file"
while IFS='=' read -r key value; do
case $key in
''|\#*) continue ;; # skip blank lines and lines starting with #
esac
# stuff with var1, etc.
eval "${key}='${value}'"
done < "${configuration}"
while [[ "$#" > 0 ]]; do case $1 in
--mode) export mode="$2";;
--sources) export sources="$2";;
--debug) debug="true";;
--log) log="true";;
*) break;;
esac; shift; shift
done
echo "Starting Up..."
if [ "$mode" != "transform" ]; then
if [ "$sources" != "rdfstream" ]; then
echo "Starting up Fuseki..."
cd fuseki
java -jar jena-fuseki-server-2.3.1.jar --update --mem /ds &
cd ..
echo "the Fuseki pid is $!"
sleep 10
fi
fi
echo "Starting up TripleWave ..."
if [ -z "${log}" ]; then
if [ -z "${debug}" ]; then
node app.js --fuseki=$! --mode="$mode" --configuration="$configuration" --sources="$sources"
else
echo "Starting in debug mode"
node debug app.js --fuseki=$! --mode="$mode" --configuration="$configuration" --sources="$sources"
fi
else
if [ -z "${debug}" ]; then
DEBUG=* node app.js --fuseki=$! --mode="$mode" --configuration="$configuration" --sources="$sources"
else
echo "Starting in debug mode"
DEBUG=* node debug app.js --fuseki=$! --mode="$mode" --configuration="$configuration" --sources="$sources"
fi
fi