Groups | Search | Server Info | Login | Register


Groups > uk.comp.os.linux > #23733

Re: daemon program?

From Dan Purgert <dan@djph.net>
Newsgroups uk.comp.os.linux, alt.os.linux.ubuntu
Subject Re: daemon program?
Date 2025-09-10 10:54 +0000
Organization A noiseless patient Spider
Message-ID <slrn10c2m6f.27s.dan@djph.net> (permalink)
References (2 earlier) <109rb8b$1i7fe$1@dont-email.me> <slrn10c2efi.27s.dan@djph.net> <109rfs8$1iu6u$1@dont-email.me> <slrn10c2hmq.27s.dan@djph.net> <uIm*hofmA@news.chiark.greenend.org.uk>

Cross-posted to 2 groups.

Show all headers | View raw


On 2025-09-10, Theo wrote:
> In uk.comp.os.linux Dan Purgert <dan@djph.net> wrote:
>> On 2025-09-10, Mike Scott wrote:
>> > On 10/09/2025 09:42, Dan Purgert wrote:
>> >> On 2025-09-10, Mike Scott wrote:
>> >>> On 04/09/2025 08:26, Richard Kettlewell wrote:
>> >>>> Mike Scott<usenet.16@sc
>> >>> ottsonline.org.uk.invalid> writes:
>> >>>>> I've been using a program 'daemon' on freebsd
>> >>>>> (eg
>> >>>>> man.freebsd.org/cgi/man.cgi?query=daemon&sektion=8&manpath=FreeBSD+14.3-RELEASE+and+Ports)
>> >>>>>
>> >>>>> which will run arbitrary programs as daemons, handling all the
>> >>>>> necessary "house-keeping" for them.
>> >>>>>
>> >>>>> I can't find a ready-to-roll linux version - is there one please?
>> >>>> If you want an (almost) identical interface then in Debian (and
>> >>>> presumably therefore also Ubuntu), there’s a command of the same name
>> >>>> and similar behavior:
>> >>>>
>> >>>> https://manpages.debian.org/trixie/daemon/daemon.1.en.html
>> >>>
>> >>> Sorry, back again.
>> >>>
>> >>> I've been playing with this and there seems to be an important feature
>> >>> missing on linux that's in the BSD version: how to do logfile rotation?
>> >>> [...]
>> >>> Have I missed something?
>> >> 
>> >> logrotate(8) ?
>> >> 
>> >> 
>> > Thanks for the reply, but no. That assumes the existence of the 
>> > mechanism missing AFAICS from this daemon.
>> 
>> I'm not sure what you mean here.  "Logrotate" is a tool that exists.
>> 
>> Granted, the systems here have been getting in-place upgrades for the
>> last decade; maybe logrotate has since been replaced in 'clean' installs
>> (or it's not a default part of the installation and I've just completely
>> forgotten that).
>
> It sounds like the problem is that 'daemon' is never closing the output
> file, so 'logrotate' is never able to process it.  The -H flag is supposed
> to tell daemon to close the file on SIGHUP so logrotate can swap it
> out, but it doesn't exist in the Debian version.

Oh, then you add 'copytruncate' to the rotate directives, and the
original log gets zeroed out when logrotate runs.


-- 
|_|O|_| 
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1  E067 6D65 70E5 4CE7 2860

Back to uk.comp.os.linux | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

daemon program? Mike Scott <usenet.16@scottsonline.org.uk.invalid> - 2025-09-04 08:08 +0100
  Re: daemon program? Richard Kettlewell <invalid@invalid.invalid> - 2025-09-04 08:26 +0100
    (resoilved) Re: daemon program? Mike Scott <usenet.16@scottsonline.org.uk.invalid> - 2025-09-04 08:38 +0100
      Re: (resoilved) Re: daemon program? Dan Purgert <dan@djph.net> - 2025-09-04 09:22 +0000
        Re: (resoilved) Re: daemon program? Paul <nospam@needed.invalid> - 2025-09-04 06:12 -0400
          Re: (resoilved) Re: daemon program? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-04 20:54 +0000
      Re: (resoilved) Re: daemon program? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-05 04:05 +0000
        Re: (resoilved) Re: daemon program? Richard Kettlewell <invalid@invalid.invalid> - 2025-09-05 08:16 +0100
          Re: (resolved) Re: daemon program? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-05 07:55 +0000
    Re: daemon program? Mike Scott <usenet.16@scottsonline.org.uk.invalid> - 2025-09-10 09:01 +0100
      Re: daemon program? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-10 08:27 +0000
        Re: daemon program? Chris Elvidge <chris@internal.net> - 2025-09-10 12:04 +0100
          Re: daemon program? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-10 19:32 +0000
            Re: daemon program? Chris Elvidge <chris@internal.net> - 2025-09-11 13:46 +0100
              Re: daemon program? Richard Kettlewell <invalid@invalid.invalid> - 2025-09-11 18:48 +0100
      Re: daemon program? Dan Purgert <dan@djph.net> - 2025-09-10 08:42 +0000
        Re: daemon program? Mike Scott <usenet.16@scottsonline.org.uk.invalid> - 2025-09-10 10:20 +0100
          Re: daemon program? Dan Purgert <dan@djph.net> - 2025-09-10 09:37 +0000
            Re: daemon program? Theo <theom+news@chiark.greenend.org.uk> - 2025-09-10 11:08 +0100
              Re: daemon program? Dan Purgert <dan@djph.net> - 2025-09-10 10:54 +0000
              Re: daemon program? Mike Scott <usenet.16@scottsonline.org.uk.invalid> - 2025-09-10 12:25 +0100
            Re: daemon program? Mike Scott <usenet.16@scottsonline.org.uk.invalid> - 2025-09-10 12:20 +0100
              Re: daemon program? Dan Purgert <dan@djph.net> - 2025-09-10 11:31 +0000
                Re: daemon program? Mike Scott <usenet.16@scottsonline.org.uk.invalid> - 2025-09-10 16:52 +0100
          Re: daemon program? Richard Kettlewell <invalid@invalid.invalid> - 2025-09-11 08:49 +0100
            (resolved) Re: daemon program? Mike Scott <usenet.16@scottsonline.org.uk.invalid> - 2025-09-11 11:02 +0100
              Re: (resolved) Re: daemon program? Chris Elvidge <chris@internal.net> - 2025-09-11 13:53 +0100
                Re: (resolved) Re: daemon program? Mike Scott <usenet.16@scottsonline.org.uk.invalid> - 2025-09-12 16:19 +0100
              Re: (resolved) Re: daemon program? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-11 22:17 +0000

csiph-web