From 12d87af63363312726c3654bbfd12523ec007dee Mon Sep 17 00:00:00 2001 From: KenwoodFox Date: Thu, 7 Apr 2022 11:12:51 -0400 Subject: [PATCH] This works --- Software/houston/Makefile | 2 ++ Software/houston/Pipfile | 1 - Software/houston/Pipfile.lock | 7 ++----- Software/houston/robotstreamer.service | 9 +++++++++ Software/houston/stream.sh | 5 +++++ 5 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 Software/houston/robotstreamer.service create mode 100755 Software/houston/stream.sh diff --git a/Software/houston/Makefile b/Software/houston/Makefile index 7d0ffff..adf9352 100644 --- a/Software/houston/Makefile +++ b/Software/houston/Makefile @@ -2,5 +2,7 @@ install: sudo cp qsstv.service /etc/systemd/system/qsstv.service + sudo cp robotstreamer.service /etc/systemd/system/robotstreamer.service sudo systemctl daemon-reload sudo systemctl enable qsstv.service + sudo systemctl enable robotstreamer.service diff --git a/Software/houston/Pipfile b/Software/houston/Pipfile index e7733a1..208985e 100644 --- a/Software/houston/Pipfile +++ b/Software/houston/Pipfile @@ -10,4 +10,3 @@ pillow = "*" [dev-packages] [requires] -python_version = "3.10" diff --git a/Software/houston/Pipfile.lock b/Software/houston/Pipfile.lock index 03be06d..33753fa 100644 --- a/Software/houston/Pipfile.lock +++ b/Software/houston/Pipfile.lock @@ -1,12 +1,10 @@ { "_meta": { "hash": { - "sha256": "a888620a07623b3edc9dfdd90eaa6568b5676e1b54ecabc03327dc1594607897" + "sha256": "d38f5cc73695023ab5e5dc66a552a8d0bb9d3842a276ca547364ce1d6baaf5b9" }, "pipfile-spec": 6, - "requires": { - "python_version": "3.10" - }, + "requires": {}, "sources": [ { "name": "pypi", @@ -65,7 +63,6 @@ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.16.0" }, "xlib": { diff --git a/Software/houston/robotstreamer.service b/Software/houston/robotstreamer.service new file mode 100644 index 0000000..ee86d6c --- /dev/null +++ b/Software/houston/robotstreamer.service @@ -0,0 +1,9 @@ +[Unit] +Description=Runs the robotstreamer stream + +[Service] +ExecStart=sudo su -l houston -c "/opt/radio/lewis-crawler/Software/houston/stream.sh" +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/Software/houston/stream.sh b/Software/houston/stream.sh new file mode 100755 index 0000000..7846f5a --- /dev/null +++ b/Software/houston/stream.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Runs the robotstream +cd /opt/radio/lewis-crawler/Software/houston/ && pipenv run python RobotStreamer.py +