OK, that makes me feel better.

According to Matthew, "The deb packages still use an init script, since it
must work on debian-based systems with or without systemd."

On Sun, Apr 24, 2022 at 7:04 PM 'Cameron D' via weewx-development <
[email protected]> wrote:

> I've been running systemd for  some years, so it's my own custom unit
> file.  I was just adjusting mine to be somewhat closer to the installed
> version.
>
> I did a clean apt install of weewx  in a debian 11 vm and there was no
> sign of any systemd unit file for weewx, other than the one based on the
> sysV init file.  What makes an installation decide to install a systemd
> unit file?
>
> On Sunday, 24 April 2022 at 9:15:28 pm UTC+10 Tom Keffer wrote:
>
>> As Rich mentions, yes, you need the StandardOutput line, but I'm
>> wondering why it was missing --- it appears in my tests. Can you give us
>> the particulars?
>>
>> - What operating system?
>> - Is this a reinstall, or a new install?
>> - If a reinstall, is this a new systemd file, or the old one?
>>
>> On Sun, Apr 24, 2022 at 1:56 AM 'Cameron D' via weewx-development <
>> [email protected]> wrote:
>>
>>> I have just implemented this in my systemd service file and notice a
>>> journal full of LOOP packets.
>>> Is that why we also need the line saying...
>>> StandardOutput=null
>>>
>>> On Saturday, 23 April 2022 at 3:21:26 pm UTC+10 Bernhard R. wrote:
>>>
>>>> Hi matthew,
>>>>
>>>> confirmed, removing the pidfile option seems not to be doing any harm.
>>>> As weewx is now started by systemd in non-forking mode, it does know
>>>> the pidfile directly from the foreground process (python) anyway, so I
>>>> would no expect any downsides of removing the pidfile-option in this 
>>>> case...
>>>>
>>>> Thanks again, guys,
>>>>
>>>> Bernhard :-)
>>>> matthew wall schrieb am Samstag, 23. April 2022 um 07:12:20 UTC+2:
>>>>
>>>>> On Saturday, April 23, 2022 at 12:54:08 AM UTC-4 Bernhard R. wrote:
>>>>>
>>>>>> May I add one more comment on this?
>>>>>> At least in the suse-world, it seems that pidfiles are to be created
>>>>>> in /run now, not in /var/run anymore, following FHS 3.0
>>>>>> <https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s13.html>.
>>>>>> I'm not sure how other distros do handle that but at least for suse,
>>>>>> it would be great to alter the ExecStart line to
>>>>>>
>>>>>> ExecStart=/usr/bin/weewxd --pidfile=/run/weewx.pid
>>>>>> /etc/weewx/weewx.conf
>>>>>
>>>>>
>>>>> thank you bernhard. the --daemon option has been removed from the
>>>>> systemd unit file at commit 8e13bad1b1e8226569d0685724ac5a4bcbfa1945
>>>>>
>>>>> i also removed the pidfile option, since the pidfile is not necessary
>>>>> for systemd, and it just causes problems, either in the location (/run vs
>>>>> /var/run) or with permissions (when running as non-root users, you must
>>>>> specify permissions on the directory in which the pid file is located).
>>>>>
>>>>> these changes should appear in weewx 4.8.1
>>>>>
>>>>> for the record, the --daemon option works in the unit file when you
>>>>> tell systemd that weewx is a forking process.  but when weewx is declared
>>>>> as a simple non-forking process, using the --daemon option causes
>>>>> problems.  for systems that do not use systemd, the --daemon option is
>>>>> still the preferred invocation.
>>>>>
>>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "weewx-development" 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-development/0de9683f-5b75-4430-a570-c3e5b5ca10e4n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-development/0de9683f-5b75-4430-a570-c3e5b5ca10e4n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "weewx-development" 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-development/3c172163-cf98-4def-bd0b-382be313a1d5n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-development/3c172163-cf98-4def-bd0b-382be313a1d5n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" 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-development/CAPq0zEAwQGCuKq7u7BKkBzy-NuSJnMjhkcKg1wYzhtZ4r%3DAcEQ%40mail.gmail.com.

Reply via email to