This script was written for a Raspberry Pi 4 with a Sense Hat in a C4Labs Zebra case.
The service file should be installed to ~/.config/systemd/user/environment_stats.service
.
mkdir -p ~/.config/systemd/user
cp ./environment_stats.service ~/.config/systemd/user/environment_stats.service
Ensure the script is executable:
chmod +x ./env_report.py
Enable the service:
systemctl --user enable environment_stats.service
Start the service:
systemctl --user start environment_stats.service
Restart:
systemctl --user restart environment_stats.service
Stop:
systemctl --user stop environment_stats.service
Disable:
systemctl --user disable environment_stats.service