diff options
Diffstat (limited to 'setup/setup.sh')
-rwxr-xr-x | setup/setup.sh | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/setup/setup.sh b/setup/setup.sh index b27fcbe1c..72fab94e9 100755 --- a/setup/setup.sh +++ b/setup/setup.sh @@ -1,24 +1,14 @@ #!/bin/sh -if which java &>/dev/null -then - if java -jar test.jar - then - mkdir -p /opt/traccar - cp -r * /opt/traccar - rm -r ../out - rm /opt/traccar/setup.sh - chmod -R go+rX /opt/traccar +mkdir -p /opt/traccar +cp -r * /opt/traccar +rm -r ../out +rm /opt/traccar/setup.sh +chmod -R go+rX /opt/traccar - mv /opt/traccar/traccar.service /etc/systemd/system - chmod 664 /etc/systemd/system/traccar.service +mv /opt/traccar/traccar.service /etc/systemd/system +chmod 664 /etc/systemd/system/traccar.service - systemctl daemon-reload - systemctl enable traccar.service - systemctl start traccar.service - else - echo 'Java 7 or higher is required' - fi -else - echo 'Java runtime is required' -fi +systemctl daemon-reload +systemctl enable traccar.service +systemctl start traccar.service |