Thread View: alt.privacy.anon-server
7 messages
7 total messages
Started by Cornelis Tromp
Sun, 19 Jun 2016 00:13
Restarting rsyslog with cron
Author: Cornelis Tromp
Date: Sun, 19 Jun 2016 00:13
Date: Sun, 19 Jun 2016 00:13
32 lines
2005 bytes
2005 bytes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have configured a cron job to clear mail.log and other log files in /var/log every 24 hours However, rsyslog will not restart... I can run the following command manually having first navigated to /var/log all is OK. rm mail.log && touch mail.log ; service rsyslog restart Any suggestions?? -----BEGIN PGP SIGNATURE----- Version: N/A iQIcBAEBAgAGBQJXZd9tAAoJEFHFlkOXyWQqvm8QAJ+7tN7Yd4hXIf+Wam8zyiSH PUpFbYTQkKUC5iYLUrR4c0XPG5q/AAvSC1Z7wiijfsVz7Z0jjM76OPLg79b1QYJL 302QlRiRm2DG1TCmLdTfVRM3/7FFfpfU1NmmNqBAVLmDowubjCHuNDCtxN/bd9/i gNviKjtne0sDNUQfxv7ieBhKCc/hOKTaYFv0FTsds3N8OFsETr9yuB2H+uk6ufnH RL874IENuCLe3adn+RZ1MOP4VxWDCWgz6u1RQ0a0IXxbMwgkGVkZAYD3Tf+E97vj 2R1K1aSGj8WokxwzBr/f2RduwIJAoS4MQraPfEG6UpeU180NgrAv3unI8T6m1fm6 QqirnhlN9cTK1SPnKIMz9KBvgIsTO2cOlKa6gxSGR74s/Z60deG1CM1Tupg8zqBG 3EUJ+GpA9/USBknqAqT1auSIaxMImp6vkUnTpXsasNN+g7dsNzOgTJwPr9RvqWvl ANVY59NQpC10JhA0bQ7e81Kel+MNMwc+BQ9EThVe1C2qqUzINPIOxCBUixdAJj8h p8B9S9vLesZ/t5jnmXm91F3uZFT2gzikBxR/Vn/vMQzsdjrXxMfgMMv6nHd8YrOe r2cy2dcxUSCWfDdQLydASBx07Nwtrew442yeG73QF3dsQ6CSuE23M2kGdgJC0GhR ZuIGNDeCD3AmmmKinHHc =wFzH -----END PGP SIGNATURE-----
Re: Restarting rsyslog with cron
Author: Anonymous
Date: Sun, 19 Jun 2016 00:53
Date: Sun, 19 Jun 2016 00:53
20 lines
1452 bytes
1452 bytes
Cornelis Tromp formulated on Saturday : > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I have configured a cron job to clear mail.log > and other log files in /var/log every 24 hours > > However, rsyslog will not restart... > > I can run the following command manually having > first navigated to /var/log all is OK. > > rm mail.log && touch mail.log ; service rsyslog restart > > Any suggestions?? > I don't think that you need to restart rsyslog. Once you have cleared the log, its cleared. I am not so sure that not keeping or clearing the mail.log really does that much good. syslog has much of the same info therin and you don't want to clear it.
Re: Restarting rsyslog with cron
Author: Nathan Hale
Date: Sun, 19 Jun 2016 01:25
Date: Sun, 19 Jun 2016 01:25
25 lines
1558 bytes
1558 bytes
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I have configured a cron job to clear mail.log > and other log files in /var/log every 24 hours > > However, rsyslog will not restart... > > I can run the following command manually having > first navigated to /var/log all is OK. > > rm mail.log && touch mail.log ; service rsyslog restart > > Any suggestions?? This is the way I do it. Just a bit over kill: # empty mail.log 00 23 * * * wipe -iqkf /var/log/mail.log &> /dev/null 05 23 * * * cat /dev/null > /var/log/mail.log You have to have wipe installed to wipe the file: wipe - Secure file deletion apt-get update && apt-get install wipe
Re: Restarting rsyslog with cron
Author: Anonymous
Date: Sun, 19 Jun 2016 02:32
Date: Sun, 19 Jun 2016 02:32
5 lines
1077 bytes
1077 bytes
On Sun, 19 Jun 2016 01:13:46 +0100 (BST), Cornelis Tromp <nobody@holland.remailer.nl> wrote: >Any suggestions?? Use logrotate.
Re: Restarting rsyslog with cron
Author: Zax
Date: Sun, 19 Jun 2016 12:20
Date: Sun, 19 Jun 2016 12:20
58 lines
2503 bytes
2503 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On Sun, 19 Jun 2016 01:13:46 +0100 (BST), Cornelis Tromp wrote in
Message-Id: <5e8cd9c5afdecbe030be8bfeb3b9e96f@anon.holland.remailer.nl>:
>
> I have configured a cron job to clear mail.log
> and other log files in /var/log every 24 hours
>
> However, rsyslog will not restart...
>
> I can run the following command manually having
> first navigated to /var/log all is OK.
>
> rm mail.log && touch mail.log ; service rsyslog restart
>
> Any suggestions??
Why not let logrotate take care of it for you?
/var/log/mail.info
{
rotate 4
daily
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
invoke-rc.d rsyslog rotate > /dev/null
endscript
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJXZo4TAAoJEC3jHKG+PvqnlPUQAKnRkfNAMbwoUWDtqVkEatY7
VV9LK82L3xVSSB3BY+J1jw5RTVzwscU00eiaFnk/coXcSTHM4M3VsjwYKKpcNUJj
4AZeMTe/6N71J64IlZ3A5T0w+TxN1zQghCnDOH9ccgIeFLl2pxfpF6MULtd+HsHi
LG/cqY636bGCMR66a0L71MdQCNguttMQmM6Lk/N7NHEkOxYAodJ/ZtehkqBNh6S9
SDPEaMpBsZoHqPiZLU5VYKc9uk9ACRPwuwm4f67NUGb+ySUQnAZTx80pgwnTG0ED
G7abR/BTKx0n+ByafW4U45J1N+0VxtRcIkrvl3rBd2MlqoONU26EM5v/XAaSZ7Kq
p0Y50c0+bURN0pXDVLV31T4PKHqXZbhC2QPKH8InfYbdtBmHWCWKzDUUgkGD8ZFW
yt4EPH4ujchcw7ff6EpeCUge9J5MkcAbHjHD51fltEdfTarXzjJ3JnQneOyZMb6B
7zFbTlcZvzk65SNf4BJICQMrIR5tZG/kubp3AeWumGA4o7v/Sp7W2anCyvmUdCCk
JmE7i6+a6zCIyek2IJG5WTq+looJnprHjjlhEiqhXPZduBdJQdzjjMhrdAffTO2H
pT1jXIaD957OGKM7cyD42GDd6EpfQ0+5vTpVx9PieDPEf8naVqQTKKfQ66Fcbn52
UACSzCmEhgBP4MCcCLrl
=p/H9
-----END PGP SIGNATURE-----
--
pub 1024D/228761E7 2003-06-04 Steven Crook <steve@mixmin.net>
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
sub 4096R/BE3EFAA7 created: 2014-11-14 expires: 2016-11-13 usage: S
Re: Restarting rsyslog with cron
Author: Cornelis Tromp
Date: Sun, 19 Jun 2016 14:01
Date: Sun, 19 Jun 2016 14:01
37 lines
1603 bytes
1603 bytes
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On Sun, 19 Jun 2016 01:13:46 +0100 (BST), Cornelis Tromp wrote in
> Message-Id: <5e8cd9c5afdecbe030be8bfeb3b9e96f@anon.holland.remailer.nl>:
>
>
>>
>> I have configured a cron job to clear mail.log
>> and other log files in /var/log every 24 hours
>>
>> However, rsyslog will not restart...
>>
>> I can run the following command manually having
>> first navigated to /var/log all is OK.
>>
>> rm mail.log && touch mail.log ; service rsyslog restart
>>
>> Any suggestions??
>
> Why not let logrotate take care of it for you?
>
> /var/log/mail.info
> {
> rotate 4
> daily
> missingok
> notifempty
> compress
> delaycompress
> sharedscripts
> postrotate
> invoke-rc.d rsyslog rotate > /dev/null
> endscript
> }
I think his fear comes from some people in here saying that mail logs shouldn't be kept on a remailer server.
Re: Restarting rsyslog with cron
Author: Anonymous
Date: Sun, 19 Jun 2016 15:16
Date: Sun, 19 Jun 2016 15:16
48 lines
2197 bytes
2197 bytes
On Sun, 19 Jun 2016 15:01:13 +0100 (BST), Cornelis Tromp <nobody@holland.remailer.nl> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> On Sun, 19 Jun 2016 01:13:46 +0100 (BST), Cornelis Tromp wrote in
>> Message-Id: <5e8cd9c5afdecbe030be8bfeb3b9e96f@anon.holland.remailer.nl>:
>>
>>
>>>
>>> I have configured a cron job to clear mail.log
>>> and other log files in /var/log every 24 hours
>>>
>>> However, rsyslog will not restart...
>>>
>>> I can run the following command manually having
>>> first navigated to /var/log all is OK.
>>>
>>> rm mail.log && touch mail.log ; service rsyslog restart
>>>
>>> Any suggestions??
>>
>> Why not let logrotate take care of it for you?
>>
>> /var/log/mail.info
>> {
>> rotate 4
>> daily
>> missingok
>> notifempty
>> compress
>> delaycompress
>> sharedscripts
>> postrotate
>> invoke-rc.d rsyslog rotate > /dev/null
>> endscript
>> }
>
> I think his fear comes from some people in here saying that mail logs shouldn't be kept on a remailer server.
The OP stated he wants to clear one or logs daily. logrotate can do that if
daily
rotate 0
are used
It's the right tool for the job.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads