blob: b27fcbe1cedc7c48005eab946643f81cbca51d47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/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
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
|