aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-08 15:51:35 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-08 15:51:35 +1300
commit88a1f80f2540886e427cab2452e038e902b6d054 (patch)
tree87f0a095c2e06430fd3b857e4ac7a46d0c41abad /setup
parentf7b489fdbf79a4dbeb6d52c1e6e53fefc938f98e (diff)
downloadtrackermap-server-88a1f80f2540886e427cab2452e038e902b6d054.tar.gz
trackermap-server-88a1f80f2540886e427cab2452e038e902b6d054.tar.bz2
trackermap-server-88a1f80f2540886e427cab2452e038e902b6d054.zip
Update package and setup scripts
Diffstat (limited to 'setup')
-rwxr-xr-xsetup/package.sh1
-rwxr-xr-xsetup/unix/setup.sh19
2 files changed, 12 insertions, 8 deletions
diff --git a/setup/package.sh b/setup/package.sh
index 8014836bb..fa5fbd277 100755
--- a/setup/package.sh
+++ b/setup/package.sh
@@ -15,7 +15,6 @@ fi
VERSION=$1
check_requirement () {
- eval $1 &>/dev/null
if ! eval $1 &>/dev/null
then
echo $2
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