Raspberry Pi Weather Station
Running wind meter as a service
Create an environment file at /etc/default/wind (not used yet, but will move config here)
Copy the init script into /etc/systemd/system/ and register it with systemd
$ sudo cp init/wind.service /etc/systemd/system/wind.service $ sudo systemctl enable wind.service Created symlink from /etc/systemd/system/multi-user.target.wants/wind.service to /etc/systemd/system/wind.service.
Then you can start it
$ sudo systemctl start wind.service
To check it has started successfully have a look in syslog:
$ sudo tail -f /var/log/syslog
Apr 23 06:42:15 raspberrypi systemd: Reloading. Apr 23 06:43:01 raspberrypi CRON: (ricky) CMD (python /home/ricky/weather/temperature.py) Apr 23 06:43:07 raspberrypi systemd: Reloading. Apr 23 06:43:24 raspberrypi systemd: Starting Wind speed measure... Apr 23 06:43:24 raspberrypi systemd: Started Wind speed measure.