using the provided weewx.service on an RPi, ‘sudo systemctl stop weewx’ sends 
SIGKILL instantly (twice), which is a very unclean termination of weewx and 
causes me problems. has anyone encountered this and has a proper fix?

so far as i can tell from the manuals (particularly ‘systemd.kill' and 
‘systemd.service’), this is defective behaviour by systemd - it should send a 
SIGTERM followed by a SIGKILL (if necessary) 90 secs later by default. instead, 
i can only stop it sending SIGKILL by setting ‘FinalKillSignal=SIGTERM’ in 
weewx.service, where systemd sends SIGTERM twice instead. ‘KillSignal=SIGTERM’ 
is ignored

my workaround is ‘SendSIGKILL=no’ in weewx.service, which nicely sends SIGTERM 
for clean shutdown, but there is no followup SIGwhatever for contingent 
termination of rogue process(es)

weewx.service with workaround is:
# systemd configuration for weewx

[Unit]
Description=weewx weather system
Requires=time-sync.target
After=time-sync.target
RequiresMountsFor=/home

[Service]
ExecStart=/home/weewx/bin/weewxd --daemon --pidfile=/run/weewx/weewx.pid 
/home/weewx/weewx.conf
ExecReload=/bin/kill -HUP $MAINPID
Type=forking
PIDFile=/run/weewx/weewx.pid
User=weewx
Group=weewx
SendSIGKILL=no  # workaround to stop SIGKILL sent instantly (systemd bug)

[Install]
WantedBy=multi-user.target

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/57F87F51-50BC-4359-A437-F8CDEF455BB3%40gmail.com.

Reply via email to