blob: 1b07990ae130f92b805606450a5af103f085a387 (
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
25
26
|
#!/bin/sh
PRESERVECONFIG=0
if [ -f /opt/traccar/conf/traccar.xml ]
then
cp /opt/traccar/conf/traccar.xml /opt/traccar/conf/traccar.xml.saved
PRESERVECONFIG=1
fi
mkdir -p /opt/traccar
cp -r * /opt/traccar
chmod -R go+rX /opt/traccar
if [ ${PRESERVECONFIG} -eq 1 ] && [ -f /opt/traccar/conf/traccar.xml.saved ]
then
mv -f /opt/traccar/conf/traccar.xml.saved /opt/traccar/conf/traccar.xml
fi
mv /opt/traccar/traccar.service /etc/systemd/system
chmod 664 /etc/systemd/system/traccar.service
systemctl daemon-reload
systemctl enable traccar.service
rm /opt/traccar/setup.sh
rm -r ../out
|