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. 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