No description
Find a file
2020-05-23 14:09:01 +02:00
aggregateweather.py Add nagios plugin 2020-05-22 17:29:46 +02:00
check_rainfall.sh Add nagios plugin 2020-05-22 17:29:46 +02:00
getweather.py Add nagios plugin 2020-05-22 17:29:46 +02:00
LICENSE Initial commit 2020-05-22 16:18:20 +02:00
README.md Update README.md 2020-05-23 14:06:44 +02:00
requirements.txt Collection of data and aggregation to mysql works 2020-05-22 16:21:18 +02:00
weather.ini Add nagios plugin 2020-05-22 17:29:46 +02:00
weather.sql Fix sql script 2020-05-23 14:09:01 +02:00

weather

Some pythonscripts that get weather data from SMHI and calculates evapotranspiration. Create a user to run scripts:

useradd -s /usr/sbin/nologin -r -M -d /opt/weather weather

Clone repo:

git clone https://github.com/mickenordin/weather.git /opt/weather

Chown:

chown -R weather:weather /opt/weather

Create mysql database:

mysql -e "CREATE DATABASE weather"
mysql -e "CREATE USER 'weather'@'localhost' IDENTIFIED BY 'password'"
mysql -e "GRANT ALL PRIVILEGES ON weather.* TO 'weather'@'localhost'"
mysql weather < /opt/weather/weather.sql

Configure and run:

vim weather.ini
./getweather.py
./aggregateweather.py