search for: endscript

Displaying 20 results from an estimated 74 matches for "endscript".

2018 Jan 30
2
Samba 4.7.4 + bind9 DLZ /backend/ dropping delegated domain
Hai, Check the content of : /etc/logrotate.d/named If you see postrotate /etc/init.d/smbd reload > /dev/null endscript Change that to postrotate if [ -d /run/systemd/system ]; then; systemctl -q is-active named && systemctl reload named; else; /etc/init.d/named reload ; fi'; endscript Its something like that, so who pointing.. That does not matter, because this is OS related. Lots or scripts use...
2020 May 25
1
log.samba missing rotation
Can you try this and adjust the path's in it. #/etc/logrotate.d/samba /var/log/samba/log.smbd { weekly missingok rotate 7 postrotate [ ! -x /usr/bin/smbcontrol ] || [ ! -f /run/samba/smbd.pid ] || /usr/bin/smbcontrol smbd reload-config endscript compress delaycompress notifempty } /var/log/samba/log.nmbd { weekly missingok rotate 7 postrotate [ ! -x /usr/bin/smbcontrol ] || [ ! -f /run/samba/nmbd.pid ] || /usr/bin/smbcontrol nmbd reload-config endscript...
2016 Mar 06
2
logrotate script error
...ate.d/logstash /var/log/logstash/* { daily rotate 7 copytruncate compress delaycompress missingok notifempty postrotate size 100M /bin/kill -HUP `cat /var/run/logstash.pid 2>/dev/null` 2> /dev/null || true endscript } I can't find the error there. Can I have a suggestion as to what's wrong and how to correct it? Thanks, Tim -- GPG me!! gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
2017 Nov 17
2
Log rotation and combining...
...# just if mysqld is really running > if test -x /usr/bin/mysqladmin && \ > /usr/bin/mysqladmin ping &>/dev/null > then > /usr/bin/mysqladmin flush-logs > fi > endscript > } > > Bill > > > On 11/16/2017 4:27 AM, SH Development wrote: >> I have recently noticed that my dovecot-deliver.log is huge and wanted to start rotating it. So a couple of questions: >> >> 1. Can the dovecot-deliver.log be combined with the maillog, that...
2017 Nov 16
2
Log rotation and combining...
..., if I create a new logrotate script example as follows: # dovecot SIGUSR1: Re-opens the log files. /home/vmail/dovecot-deliver.log { missingok notifempty delaycompress sharedscripts postrotate /bin/kill -USR1 `cat /var/run/dovecot/master.pid 2>/dev/null` 2> /dev/null || true endscript } I get the following error only when cron tries to run it: /etc/cron.daily/logrotate: error: stat of /home/vmail/dovecot-deliver.log failed: Permission denied Owner on the log are vmail:vmail. If I manually force logrotate on this particular log, it works fine. Ethon
2010 Jan 15
4
Logrotate in CentOS 5.4 more brutal (to httpd at least) than in 5.3?
...t are made, I saw that the logrotate command for apache was changed. In 5.3 it did a reload, but in 5.4 it does a hard kill: CentOS 5.3: /var/log/httpd/*log { missingok notifempty sharedscripts postrotate /sbin/service httpd reload > /dev/null 2>/dev/null || true endscript } CentOS 5.4: /var/log/httpd/*log { missingok notifempty sharedscripts postrotate /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true endscript } Isn't this a bit harsh in 5.4? Wouldn't the 5.3 method be better? -Christopher Thorju...
2009 Nov 09
3
Sort logfiles at rotation time
Hi, I want to be certain that my apache and varnish logfiles are in strict date order when rotated. I'd like to run a sort command against them before they're compressed. I've had a look at the logrotate man page, and it looks like I can use a postrotate/endscript to do this. However, I can see any reference in the documentation for how to operate on the file. All the examples seem to take the form of restarting something, or running some other standalone script. What I want to do is run a sort command against the newly rotated file - but how do I know wh...
2018 May 14
3
Logrotate
...     daily         compress         dateext         size 100M         nomail         missingok         notifempty         create 644 root root         #postrotate         #        systemctl stop samba &> /dev/null         #        systemctl start samba &> /dev/null         #endscript } -- My problem is, when logrotate is executed, log is rotate but after , don't log messages anymore, log.samba is was"zero"., is need restart in samba, then log message is back. Any idea? Regards;
2018 Jun 15
2
After logrotation Dovecot still writes to old log file
Thanks man You suggesting the same as https://wiki2.dovecot.org/Logging says? postrotate kill -s 0 `cat /var/run/dovecot/master.pid` || kill -s USR1 `cat /var/run/dovecot/master.pid` endscript Well, I already tried that and didn't work. Hence my guess that it's something else. On 15/06/18 13:19, Stephen Satchell wrote: > From the manpage: > SIGNALS > Dovecot handles the following signals as described: > > USR1 Force dovecot to reopen all con...
2017 Nov 17
2
Log rotation and combining...
...;>> if test -x /usr/bin/mysqladmin && \ >>> /usr/bin/mysqladmin ping &>/dev/null >>> then >>> /usr/bin/mysqladmin flush-logs >>> fi >>> endscript >>> } >>> >>> Bill >>> >>> >>> On 11/16/2017 4:27 AM, SH Development wrote: >>>> I have recently noticed that my dovecot-deliver.log is huge and wanted to start rotating it. So a couple of questions: >>>> >>&gt...
2013 Apr 26
3
Problem with tinc.log and logrotate.
Hi everyone again. I run tinc with the following command: /usr/sbin/tincd -d1 --logfile=/var/log/tinc.log That creates the file "/var/log/tinc.log" correctly and reports into it. Well, because I want to have a log file by day, I have created a logrotate file (/etc/logrotate.d/tinc) that contains the following lines: ----------------------------------------- /var/log/tinc.log {
2018 Jun 14
2
After logrotation Dovecot still writes to old log file
...recently created /var/log/dovecot.log Here my logrotate config for Dovecot: /var/log/dovecot.log { ??????? su root syslog ??????? rotate 7 ??????? missingok ??????? copytruncate ??????? create 666 root syslog ??????? sharedscripts ??????? postrotate ??????????? doveadm log reopen ??????? endscript } Doveadm should reopen it but no, still writes to old log file. Not sure, maybe it's someone else, not dovecot, writing to the log file? And here the versions: # 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.21 (92477967) # OS: Linux 4.14.49-rh65-20180612025235.x...
2012 Oct 03
0
Logrotate "firstaction" with non-0 exit status. Or: How to keep logrotate from rotating via scripts?
Hi, I'm wondering if anyone here has any experience with the "firstaction" script in logrotate config files, or more specifically, the behaviour with a non-0 exit status. The logrotate manpage says: firstaction/endscript The lines between firstaction and endscript (both of which must appear on lines by themselves) are executed (using /bin/sh) once before all log files that match the wildcarded pattern are rotated, before prerotate script is run and only if at least one log will actually be rota...
2020 May 22
3
log.samba missing rotation
I know about this param, I configured it and log.smbd, log.nmbd and others are rotated, log.samba is not. ----- Original Message ----- > From: "samba" <samba at lists.samba.org> > To: "Lorenzo Milesi" <maxxer at yetopen.it>, "samba" <samba at lists.samba.org> > Sent: Thursday, May 21, 2020 7:29:04 PM > Subject: Re: [Samba] log.samba
1999 Jul 10
5
2.0.4b: logrotate problems with rh60
...illall -HUP nmbd endrotate } /var/log/samba/log.smb { postrotate /usr/bin/killall -HUP smbd endrotate } ===== 1) I think that the use of "endrotate" is wrong. There is no "endrotate" in logrotate's (logrotate-3.2-1) man pages; the man examples use "endscript". The use of "endrotate" has the effect that logrotate does only the rotation of the first entry of the file, log.nmb, and leaves log.smb "not-rotated". If I put "endscript" in place of "endrotate" then log.smb is rotated too. 2) It seems that once the...
2017 May 12
3
samba-ad restart fails occasionally
Hi, We are running sernet samba, and on one particular DC (debian 7.11, samba 4.5.6), when logrotate is ready rotating, "sernet-samba-ad restart" fails with: > Shutting down SAMBA AD services : ...trying once more ... (warning). > ...trying once more ... (warning). ..... > ...trying once more ... (warning). > Error: /usr/sbin/samba still running with PID=14755 from
2005 Jun 30
5
Logrotate
I created some scripts to logrotate. I am having a problem. After I do it, I am sending kill -HUP to the process its not using the newly created messages file again. Could someone help me out with how I can rotate asterisk's log's without killing the process? ..o-------------------------------------------------------o. Brian Fertig NOC/Network Engineer Planet Telecom, Inc. Tampa, FL
2017 Mar 19
2
Permission denied when logrotating dovecot.log
...Set "su" directive in config file to tell logrotate which user/group should be used for rotation. This is my current logrotation conf for dovecot: /var/log/dovecot*.log { rotate 10 missingok sharedscripts postrotate doveadm log reopen endscript } And the /var/log folder has these permissions: drwxrwxr-x 12 root syslog 4.0K Mar 19 12:43 log Any clues what's wrong? Thanks Michael -- Binary Kitchen Michael Heuberger 1/33 Parrish Road Sandringham Auckland 1025 (New Zealand) Mobile (text only) ... +64 21 261 89 81 Email .......
2018 Jan 29
3
Samba 4.7.4 + bind9 DLZ /backend/ dropping delegated domain
Just a wild guess, but I and others have been having problems with samba_dlz, because of named "reload." Try to see if systemctl reload named and systemctl restart named break and fix the server respectively. (if your're not using systemd, try "serivice named reload", "service named restart instead") If you have a /etc/logrotate.d/named file containing
2016 Mar 06
0
Re: logrotate script error
...daily > rotate 7 > copytruncate > compress > delaycompress > missingok > notifempty > postrotate > size 100M > /bin/kill -HUP `cat /var/run/logstash.pid 2>/dev/null` 2> /dev/null > || true > endscript > } > > I can't find the error there. Can I have a suggestion as to what's wrong > and how to correct it? Multiple errors here, first hint: "man 8 logrotate" is a good start. Second: wrong order of lines: diff -U2 [code] --- your logstash-rotate +++ corrected logstas...