From a1179842761b7a57794af3157dd7829c759bc2c6 Mon Sep 17 00:00:00 2001 From: Jonathan Flueren Date: Thu, 17 Aug 2023 18:21:57 +0200 Subject: [PATCH] Update README.md --- README.md | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a8066cc..1b42c4c 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,8 @@ Dependencies: - Website: php Configs to change: -- `scanner/scan.sh`: +- `scanner/live-scanner.sh`: - WiFi adapter name - - network restart routines (front-end) - `scanner/upload.py`: - URLs for webhook and identities - webhook secret @@ -23,4 +22,38 @@ Configs to change: - webhook secret Put `scanner` onto the scanning device (e.g. Raspberry Pi) and put `scanner/scan.sh` into a cron job. -Put `website` onto a php-capable webserver and point your domain to it. \ No newline at end of file +Put `website` onto a php-capable webserver and point your domain to it. + +## Systemd services +Service for scanning packets in the background +```systemd +[Unit] +Description=CZI Presence Detector - Scanner +After=network.target + +[Service] +User=root +Group=root +Restart=always +WorkingDirectory=/path/to/scanner +ExecStart=/path/to/scanner/live-scanner.sh + +[Install] +WantedBy=multi-user.target +``` +Service for uploading every $n seconds +```systemd +[Unit] +Description=CZI Presence Detector - Uploader +After=network.target + +[Service] +User=pi +Group=pi +Restart=always +WorkingDirectory=/path/to/scanner +ExecStart=/path/to/scanner/live-uploader.sh + +[Install] +WantedBy=multi-user.target +``` \ No newline at end of file