In fact it was a systemd problem.

I solved by using the service file you provided. Before I tried whit one I 
googled.
The line missing in my own service file was:
PIDFile=/var/run/weewx.pid
I'm also new on systemd. But I remember reading something about "problems" 
about handling pid and the importance of providing this especially when 
running scripts from a service. Or something like that...

Also:
At least in Ubuntu syslog.service and ntp.service doesn't exist (required 
in the service you provided).
As i understand it after reading about systemd now for two days it should 
instead be:
syslog.socket and time-sync.target 
And you can write them on the same row separated with space


So the Upstart script provided with the deb package is not (cant find out 
why) compatible with systemd.

I am running weewx as root. Both in Upstart script and systemd. Ubuntu 
16.04 uses systemd as default. And I am on systemd on my system!
Is everyone else running Ubuntu 16.04 or later still using Upstart? I know 
you still can use Upstart, but I can't remember getting an option to choose 
when I did the upgrade...

I will (when I have some more time to play around) try to assemble a 
"better" service.
I think it is a good idea to also wait sql (if you use that as I do) and 
maybe also a udev rule that waits for the station to be connected.
But as I wrote, I am new to systemd so it needs some more reading and 
testing...

Any way, Thank you for your time and for helping me!!!

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to