From f8aed654b9e211c8b90db0ad03336f6717017d44 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 16 Jun 2024 16:37:37 +0300 Subject: [PATCH] service unit --- README.md | 3 ++- lego-monitoring.service | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 lego-monitoring.service diff --git a/README.md b/README.md index afdbfa8..6bb4e40 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,5 @@ ## Running * `prettyprint.py` -- check and print all sensors -* TODO -- launch service +* `service.py` -- launch service +* `lego-monitoring.service` is a systemd unit that starts `service.py` diff --git a/lego-monitoring.service b/lego-monitoring.service new file mode 100644 index 0000000..2ca22a2 --- /dev/null +++ b/lego-monitoring.service @@ -0,0 +1,10 @@ +[Unit] +After=docker.service + +[Service] +ExecStart=/opt/lego-monitoring/.venv/bin/python /opt/lego-monitoring/service.py +Type=exec +Restart=always + +[Install] +WantedBy=multi-user.target