Skip to content

Systemd Service

Jan Weiß edited this page Jun 30, 2016 · 1 revision

Starting the Backend as Systemd Service

There are two different service files which can be found in the scripts/ folder of the project. The mrf.service is for a real rover and the mrf-mock.service is for a raspberry pi where the gpio pins are mocked.


Initialize the Service

First of all the mrf.service or the mrf-mock.service have to be copied in the /etc/systemd/system/ folder on the raspberry pi:

sudo cp <location of the service file> /etc/systemd/system/

After the file is copied the systemctl has to be reloaded:

sudo systemctl daemon-reload

Afterward you have to enable the service to launch it at systems startup:

sudo systemctl enable mrf


Start/Stop the Service

For starting the service manually:

sudo systemctl start mrf

For stopping the service:

sudo systemctl stop mrf


Remove the Service

Fist you have to stop the service as described in the section above. Afterwards the service have to be disabled:

sudo systemctl disable mrf

Then the systemctl have to be reloaded and the service can be removed:

sudo systemctl daemon-reload
sudo rm /etc/systmd/system/mrf.service

Clone this wiki locally