This commit is contained in:
Your Name
2025-03-26 10:30:24 +01:00
parent e75caff929
commit 970a36598c
6 changed files with 119 additions and 45 deletions

View File

@@ -18,6 +18,38 @@ Attention: The Raspberry Pi doesn't have analog inputs, so we need an analog-to
sudo /usr/bin/python3 /var/www/nebuleair_pro_4g/windMeter/read.py
this need to run as a service
--> sudo nano /etc/systemd/system/windMeter.service
⬇️
[Unit]
Description=Master manager for the Python wind meter scripts
After=network.target
[Service]
ExecStart=/usr/bin/python3 /var/www/nebuleair_pro_4g/windMeter/read.py
Restart=always
User=root
WorkingDirectory=/var/www/nebuleair_pro_4g
StandardOutput=append:/var/www/nebuleair_pro_4g/logs/wind.log
StandardError=append:/var/www/nebuleair_pro_4g/logs/wind_errors.log
[Install]
WantedBy=multi-user.target
⬆️
Reload systemd (first time after creating the service):
sudo systemctl daemon-reload
Enable (once), start (once and after stopping) and restart (after modification)systemd:
sudo systemctl enable windMeter.service
sudo systemctl start windMeter.service
sudo systemctl restart windMeter.service
Check the service status:
sudo systemctl status windMeter.service
'''
#!/usr/bin/python3
import time