Running ot-recorder (OwnTracks) from systemd

# editor /lib/systemd/system/ot-recorder.service

[Unit]
Description=OwnTracks-Recorder
After=network.target

[Service]
EnvironmentFile=/etc/mosquitto/environment
ExecStart=/usr/local/sbin/ot-recorder -H localhost -p 8883 –norec –http-host <localip> –clientid <username> “owntracks/#”
Restart=always
KillMode=process

[Install]
WantedBy=multi-user.target

# editor /etc/mosquitto/environment

OTR_CAFILE=”/etc/ca.crt”
OTR_PASS=”<Password>”

Advertisements