diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-17 21:22:34 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-17 21:22:46 +1200 |
commit | 1432d04a7be8397becd5c88f9e1f075861acbfdc (patch) | |
tree | fa7a4b6619ffee11a4eac9d28f5ab56d4d1fe3d0 /setup/setup.sh | |
parent | 99bf70e274fbfb03e0f65c564d7c9f5bdaf115c4 (diff) | |
download | trackermap-server-1432d04a7be8397becd5c88f9e1f075861acbfdc.tar.gz trackermap-server-1432d04a7be8397becd5c88f9e1f075861acbfdc.tar.bz2 trackermap-server-1432d04a7be8397becd5c88f9e1f075861acbfdc.zip |
Update packaging scripts
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 |