diff options
author | Hans van den Elsen <hans.elsen@esds.nl> | 2016-03-11 22:16:25 +0100 |
---|---|---|
committer | Hans van den Elsen <hans.elsen@esds.nl> | 2016-03-11 22:16:25 +0100 |
commit | 4606737cc07b736f9c8f98ae680b928c94c082c8 (patch) | |
tree | bdd29b24a16403b1e8a3d7cd4325391063b34b8a /setup/unix/setup.sh | |
parent | 3ced99384b1967f5cde9abdf30c1c0184a5ae3f6 (diff) | |
parent | ab5d21e16ac44957e04da0f06daf148af95e96be (diff) | |
download | trackermap-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-x | setup/unix/setup.sh | 19 |
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 |