fixed! for non-root user running weewx.
i recommend this be updated in util/init.d/weewx.debian (after someone tests it 
for root user…)

start-stop-damon(8) clearly says
-p, --pidfile pid-file
              ...
              Warning:  using  this match option with a world-writable pidfile
              or using it alone with a daemon that writes the  pidfile  as  an
              unprivileged  (non-root)  user  will  be  refused  with an error
              (since version 1.19.3) ...
‘using it alone’ → so i just added another daemon-identifying matching option 
readily to hand, the username

the ‘stop’ request in weewx script becomes
start-stop-daemon --stop --pidfile $WEEWX_PID --user $(echo $WEEWX_USER | sed 
's/:.*$//')
and it works like a charm!

> On 9 Jul 2020, at 3:19 pm, Graham Eddy <[email protected]> wrote:
> 
>  * ’sudo /etc/init.d/weewx stop’ and ’sudo /systemctl stop weewx’ fail to 
> stop weewx; weewx process running happily but systemctl reports it in failed 
> state
> 

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/3BB9C647-6A39-4E0F-9CE4-6C91A2FD1737%40gmail.com.

Reply via email to