diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-08 17:14:14 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-08 17:14:14 +1200 |
commit | 6c302a650cfb67506c51ca14d5e16bbf2709c8f4 (patch) | |
tree | ef6555a4430965170d3b20be71cd1f5c0ce6a52d /setup/setup.sh | |
parent | b368eda2a2673fceb304efd4a64f36ca7e5b7b9e (diff) | |
download | trackermap-server-6c302a650cfb67506c51ca14d5e16bbf2709c8f4.tar.gz trackermap-server-6c302a650cfb67506c51ca14d5e16bbf2709c8f4.tar.bz2 trackermap-server-6c302a650cfb67506c51ca14d5e16bbf2709c8f4.zip |
Split setup script again
Diffstat (limited to 'setup/setup.sh')
-rwxr-xr-x | setup/setup.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/setup/setup.sh b/setup/setup.sh new file mode 100755 index 000000000..502c0397b --- /dev/null +++ b/setup/setup.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if which java &>/dev/null +then + 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 /opt/traccar + cp -r * /opt/traccar + rm /opt/traccar/setup.sh + chmod -R go+rX /opt/traccar + /opt/traccar/bin/installDaemon.sh + fi +else + echo 'Java runtime is required' +fi |