[Eisfair] syslogd / logrotate

Stefan Heidrich stefan-in-news at web.de
Mi Apr 28 13:12:27 CEST 2021


Hallo Ansgar, hallo NG,

>>> SYSLOGD_DEST_3_POSTROTATE_CMD='/etc/init.d/syslogd  --quiet restart'
>>> SYSLOGD_DEST_4_POSTROTATE_CMD='/etc/init.d/syslogd   --quiet restart'
>>> entgeht dem Vergleich
> 
> Das war mehr für Holger. Die Prüfung/Optimierung ist
> nicht perfekt!
> 
>> Das stimmt leider nicht. Wenn ich das so eintrage startet syslogd 
>> nicht mehr.
> 
> Das kann ich nicht nachvollziehen.
> 
> Das Skript erzeugt, entsprechend den SYSLOGD_DEST_#_POSTROTATE_CMD
> sogar so etwas:
>     postrotate
>         /etc/init.d/syslogd --quiet restart
>         sleep 3
>         /etc/init.d/syslogd  --quiet restart
>         sleep 3
>         /etc/init.d/das_ist_quatsch   --quiet restart
>         sleep 3
>     endscript

doch, sieht beim Start dann so aus:

Start syslogd...
  * Starting syslogd ...
Usage:
   syslogd [-46AdFknsTv?] [-a PEER] [-b NAME] [-f FILE] [-m INTERVAL]
                          [-P PID_FILE] [-p SOCK_PATH] [-r SIZE[:NUM]]
Options:
   -4        Force IPv4 only
   -6        Force IPv6 only
   -A        Send to all addresses in DNS A, or AAAA record
   -a PEER   Allow PEER to use us as a remote syslog sink. Ignored when 
started
             with -s. Multiple -a options may be specified:
               ipaddr[/len][:port]   Accept messages from 'ipaddr', 
which may
                                     be IPv4 or IPv6 if enclosed with 
'[' and
                                     ']'.  The optional port may be a 
service
                                     name or a port number
               domainname[:port]     Accept messages where the reverse 
address
                                     lookup yields 'domainname' for the 
sender
                                     address.  'domainname' may contain 
special
                                     shell-style pattern characters like '*'

   -b NAME   Bind to a specific address and/or port. Multiple -b options 
may be
             specified. Default is to listen on all interfaces on UDP 
port 514,
             unless also started with -s:
               address[:port]        Hostname or IP address, IPv6 addresses
                                     must be enclosed in '[' and ']'
               :port                 UDP port number, or service name
                                     default: 'syslog', port 514

   -d        Enable debug mode, implicitly enables -F to prevent 
backgrounding
   -F        Run in foreground, required when monitored by init(1)
   -f FILE   Alternate .conf file, default: /etc/syslog.conf
   -k        Allow logging with facility 'kernel', otherwise remapped to 
'user'
   -m MINS   Interval between MARK messages, 0 to disable, default: 20 min
   -n        Disable DNS query for every request
   -P FILE   File to store the process ID, default: /run/syslogd.pid
   -p PATH   Path to UNIX domain socket, multiple -p create multiple 
sockets.
             Default, if no -p argument is given: /dev/log
   -r S[:R]  Enable log rotation. The size argument (S) takes k/M/G 
qualifiers,
             e.g. 2M for 2 MiB.  The optional rotations argument default 
to 5.
             Rotation can also be defined per log file in /etc/syslog.conf
   -s        Operate in secure mode, do not log messages from remote 
machines.
             If specified twice, no socket at all will be opened, which also
             disables support for logging to remote machines.
   -T        Use local time and date for messages received from remote hosts
   -?        Show this help text
   -v        Show program version and exit

Bug report address: https://github.com/troglobit/sysklogd/issues
Project home page:  https://github.com/troglobit/sysklogd       [ FAIL ]

Press ENTER to continue


> Lass einfach die überflüssigen SYSLOGD_DEST_#_POSTROTATE_CMD
> leer!

Das birngt das gleiche ergebnis wie oben: syslogd startet nicht mehr.

Viele Grüße
Stefan


Mehr Informationen über die Mailingliste Eisfair