aboutsummaryrefslogtreecommitdiff
path: root/setup/unix/setup.sh
blob: cf93e8985a4820e26bf264d123ddf0da8459f21a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

UNIX_PATH="/opt/traccar"

if [ $(java -version 2>&1 | grep -i version | sed 's/.*version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q') -lt 17 ]
then
  echo "Please install Java version 7 or higher"
else
  mkdir $UNIX_PATH
  cp -rf * $UNIX_PATH
  chmod -R +r $UNIX_PATH
  $UNIX_PATH/bin/traccar install
  rm $UNIX_PATH/setup.sh
fi