Compare commits

...

2 Commits

Author SHA1 Message Date
Pim van den Berg 8bde04ba41 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)
```
2022-12-25 14:02:55 +01:00
Pim van den Berg 8f02e2b833 fix(readme): install odbcinst1debian2
odbcinst1debian2 is a dependency of odbc-mdbtools.
2022-12-25 13:55:04 +01:00
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ See the [pislave](https://github.com/ootjersb/pislave#wiring) project
pigpiod \ # Pigpio daemon to communicate over the I2C bus
python3-pigpio \ # Python module to talk to the pigpio daemon
python3-pyodbc \ # Python module to access an ODBC database
odbcinst1debian2 \ # Library for accessing ODBC config files (odbc-mdbtools dependency)
sqlite3 \ # To store a subset of the Itho database in SQLite
direnv \ # Environment variable manager to store credentials for InfluxDB
python3-influxdb # To export measurements to InfluxDB
@ -129,7 +130,7 @@ Assuming InfluxDB is running on the Raspberry Pi as well.
cat > /etc/cron.d/itho <<EOT
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
```