You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Mikael Nordin 156450d10c
Update README.md
5 years ago
LICENSE Initial commit 5 years ago
README.md Update README.md 5 years ago
aggregateweather.py Add nagios plugin 5 years ago
check_rainfall.sh Add nagios plugin 5 years ago
getweather.py Add nagios plugin 5 years ago
requirements.txt Collection of data and aggregation to mysql works 5 years ago
weather.ini Add nagios plugin 5 years ago
weather.sql Correct index and create if not exists 5 years ago

README.md

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 < weather.sql

Configure and run:

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