From 2a72d4eeaadd883056944ab7c3908a1d622aecd9 Mon Sep 17 00:00:00 2001 From: Silas <67681686+Tqnsls@users.noreply.github.com> Date: Thu, 1 Jun 2023 16:39:55 +0200 Subject: [PATCH 1/2] Create tgtg-scanner.service --- contrib/tgtg-scanner.service | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 contrib/tgtg-scanner.service diff --git a/contrib/tgtg-scanner.service b/contrib/tgtg-scanner.service new file mode 100644 index 00000000..cfba06f6 --- /dev/null +++ b/contrib/tgtg-scanner.service @@ -0,0 +1,7 @@ +[Unit] +Description=TGTG-Scanner + +[Service] +ExecStart=/usr/local/bin/python3.9 /opt/tgtg-notifier/tgtg/src/main.py +SyslogIdentifier=tgtg-scanner +Restart=always From 4c17dd3e0c4cecc9d0cf27bbc1a47df48566e604 Mon Sep 17 00:00:00 2001 From: Silas <67681686+Tqnsls@users.noreply.github.com> Date: Thu, 1 Jun 2023 16:48:10 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index c971ba06..b91de2f5 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,12 @@ python src/main.py -f -J >> items.json Creates a formatted JSON file containing all your favorite items and their available information. +### Systemd unit file + +If you wish to use tgtg-scanner as an boot-enablable systemd-unit you can copy the unit file from ````contrib```` to the defined paths. +````cp contrib/tgtg-scanner.service /usr/lib/systemd/system/```` or ````cp contrib/tgtg-scanner.service /etc/systemd/system/```` + + ### Metrics Enabling the metrics option will expose an HTTP server on the specified port supplying the currently available items. You can scrape the data with Prometheus to create and visualize historic data or use it with your home automation.