Hello
It took a lifetime to upgrade to raspbian jessie but the rpi finally did it. Weewx (standard init service) works well without any modifications.
I went a little bit further and created a "weewx.service" file in "/lib/systemd/system" almost like Matthew posted here yesterday. I moved the old "weewx" init file from "/etc/init.d" to "/home/pi" and left it there as a backup.
# systemd configuration for weewx
[Unit]
Description=WEEWX Service
Requires=systemd-journald.service
Requires=ntp.service
Requires=bluetooth.service
Requires=rfcomm.service
After=systemd-journald.service
After=ntp.service
After=bluetooth.service
After=rfcomm.service
[Service]
ExecStart=/usr/share/weewx/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf
ExecReload=/bin/kill -HUP $MAINPID
Type=simple
PIDFile=/var/run/weewx.pid
[Install]
WantedBy=multi-user.target
As my "WS1" weather station is connected via bluetooth I added the bluetooth and rfcomm dependencies. By the way, the bluetooth stack changed and as far as I know "rfcomm.conf" file is not an option anymore, so I had to create a new service for it.
To enable, start and check weewx service:
sudo systemctl enable weewx
sudo systemctl start weewx
sudo systemctl status weewx
● weewx.service - WEEWX Service
Loaded: loaded (/lib/systemd/system/weewx.service; enabled)
Active: active (running) since Thu 2015-06-11 15:53:04 ART; 4min 5s ago
Main PID: 570 (python)
CGroup: /system.slice/weewx.service
└─570 python /usr/share/weewx/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf
Jun 11 15:57:06 PiPlantino weewx[570]: ws1: close serial port /dev/rfcomm0
Jun 11 15:57:06 PiPlantino weewx[570]: ws1: open serial port /dev/rfcomm0
Jun 11 15:57:07 PiPlantino weewx[570]: ws1: close serial port /dev/rfcomm0
I removed rsyslog also because journald is now active and it's very nice.
We can execute "sudo journalctl -f -u weewx" instead of "tail -f /var/log/syslog".
Rsyslog has a small bug after the update. It's constantly showing "rsyslogd-2007: action 'action 17' suspended". It's already reported and not fixed so I decided to remove it.
That's all.
Regards!
H
On Wednesday, June 10, 2015 at 2:58:58 PM UTC-3, Horacio wrote: