forked from metarelate/metOcean-mapping
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_fuseki.sh
executable file
·54 lines (47 loc) · 1.51 KB
/
run_fuseki.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
#!/bin/sh
# (C) British Crown Copyright 2011 - 2012, Met Office
#
# This file is part of metOcean-mapping.
#
# metOcean-mapping is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# metOcean-mapping 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with metOcean-mapping. If not, see <http://www.gnu.org/licenses/>.
# currently based on jena-fuseki-0.2.3
# use ONLY with 'localhost' as this version has no authentication.
#
# '/metocean' is a graph label that becomes part of the SPARQL endpoint query URL
# e.g. http://127.0.0.1:3030/metocean/query?
PORT=3131
if [ X"$1" = X"start" ]
then
word=$1
elif [ X"$1" = X"stop" ]
then
word=$1
else
echo "Usage: $0 [start|stop]"
exit 255
fi
if [ "$word" = "start" ]
then
/usr/bin/nohup $FUSEKI_HOME/fuseki-server --loc=./metocean_store/ --update --port=$PORT /metocean &
fi
if [ "$word" = "stop" ]
then
EE=`ps -ef | grep 'fuseki-server' | fgrep "port=$PORT" | grep -v grep | awk '{print $2}'`
if [ X"$EE" != X"" ]
then
kill $EE
else
echo 'Fuseki server not running.'
fi
fi