From 2b557ba793ab3c9e62c27f8673b6edafab834e45 Mon Sep 17 00:00:00 2001 From: wouter gordts Date: Thu, 4 Jul 2019 20:32:41 +0100 Subject: [PATCH] added some systemd documentation --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 5d5f634..3be7393 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,36 @@ The following OSC messages can be sent to the server. /get/cpu ``` +It's running as a systemd service with the following configuration at */etc/systemd/system/osc_server.service*. + +```bash +[Unit] +Description=OSC server for puredata +After=network.target + +[Service] +Type=simple +User=pi +Group=pi +WorkingDirectory=/home/pi/sources/puredata/ +ExecStart=/usr/bin/python3 osc_server.py +StandardOutput=syslog +StandardError=syslog + +[Install] +WantedBy=multi-user.target +``` + +Controlling the service is done with the following commands. + +```bash +sudo systemctl start osc_server.service +sudo systemctl stop osc_server.service +sudo systemctl restart osc_server.service +sudo systemctl status osc_server.service + +``` + # todo * have each chapter be more verbose