1
0
mirror of https://github.com/pommi/python-itho-wpu.git synced 2024-11-22 14:02:15 +01:00

fix(readme): suppress direnv loading output in cron

By default direnv outputs this while executing:
```
direnv: loading ~/python-itho-wpu/.envrc
```

In a cronjob this results in emails, or when no MTA is configured:
```
CRON[1095]: (CRON) info (No MTA installed, discarding output)
```
This commit is contained in:
Pim van den Berg 2022-12-25 14:02:55 +01:00
parent 8f02e2b833
commit 8bde04ba41

View File

@ -130,7 +130,7 @@ Assuming InfluxDB is running on the Raspberry Pi as well.
cat > /etc/cron.d/itho <<EOT cat > /etc/cron.d/itho <<EOT
PATH=/usr/bin:/bin:/usr/sbin:/sbin PATH=/usr/bin:/bin:/usr/sbin:/sbin
*/5 * * * * root cd /root/python-itho-wpu && direnv exec . ./itho-wpu.py --action getdatalog --export-to-influxdb >> /var/log/itho.log */5 * * * * root cd /root/python-itho-wpu && DIRENV_LOG_FORMAT='' direnv exec . ./itho-wpu.py --action getdatalog --export-to-influxdb >> /var/log/itho.log
EOT EOT
``` ```