aboutsummaryrefslogtreecommitdiff
path: root/setup/unix/setup.sh
diff options
context:
space:
mode:
authorHans van den Elsen <hans.elsen@esds.nl>2016-03-11 22:16:25 +0100
committerHans van den Elsen <hans.elsen@esds.nl>2016-03-11 22:16:25 +0100
commit4606737cc07b736f9c8f98ae680b928c94c082c8 (patch)
treebdd29b24a16403b1e8a3d7cd4325391063b34b8a /setup/unix/setup.sh
parent3ced99384b1967f5cde9abdf30c1c0184a5ae3f6 (diff)
parentab5d21e16ac44957e04da0f06daf148af95e96be (diff)
downloadtrackermap-server-4606737cc07b736f9c8f98ae680b928c94c082c8.tar.gz
trackermap-server-4606737cc07b736f9c8f98ae680b928c94c082c8.tar.bz2
trackermap-server-4606737cc07b736f9c8f98ae680b928c94c082c8.zip
Merge remote-tracking branch 'refs/remotes/tananaev/master'
Diffstat (limited to 'setup/unix/setup.sh')
-rwxr-xr-xsetup/unix/setup.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/setup/unix/setup.sh b/setup/unix/setup.sh
index 902139a1a..478966ea0 100755
--- a/setup/unix/setup.sh
+++ b/setup/unix/setup.sh
@@ -2,13 +2,18 @@
UNIX_PATH="/opt/traccar"
-if [ $(java -version 2>&1 | grep -i version | sed 's/.*version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q') -lt 17 ]
+if which java &>/dev/null
then
- echo "Please install Java version 7 or higher"
+ if [ $(java -version 2>&1 | grep -i version | sed 's/.*version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q') -lt 17 ]
+ then
+ echo "Java 7 or higher required"
+ else
+ mkdir -p $UNIX_PATH
+ cp -rf * $UNIX_PATH
+ chmod -R go+rX $UNIX_PATH
+ $UNIX_PATH/bin/traccar install
+ rm $UNIX_PATH/setup.sh
+ fi
else
- mkdir -p $UNIX_PATH
- cp -rf * $UNIX_PATH
- chmod -R go+rX $UNIX_PATH
- $UNIX_PATH/bin/traccar install
- rm $UNIX_PATH/setup.sh
+ echo "Java runtime is required"
fi