From d8f1037625bbe99e4a9a0e8eb01976ab1c156f63 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Mon, 3 Aug 2020 20:48:24 +0200 Subject: [PATCH] systemd unit --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index fac661e..3888da2 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,8 @@ https://github.com/thaytan/gst-rpicamsrc/blob/master/examples/webrtc-unidirectio https://github.com/centricular/gstwebrtc-demos/blob/master/multiparty-sendrecv/gst/mp-webrtc-sendrecv.c https://gitlab.freedesktop.org/gstreamer/gst-examples/-/blob/master/webrtc/multiparty-sendrecv/gst-rust/src/main.rs +https://github.com/aiortc/aiortc/blob/main/examples/webcam/webcam.py + ## nginx.conf ``` @@ -116,3 +118,26 @@ server { } ``` +## /etc/systemd/system/roberto.service + +``` +[Unit] +Description=Roberto Python +Wants=network.target + +[Service] +Type=simple +User=pi +Group=pi +WorkingDirectory=/home/pi/roberto +ExecStart=/usr/bin/env /home/pi/roberto/raspberry/roberto.py +Restart=on-failure + +[Install] +WantedBy=multi-user.target +``` + +chmod a+x /home/pi/roberto/raspberry/roberto.py +systemctl daemon-reload +systemctl enable roberto +systemctl start roberto