WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Rsyslog not working  (Read 925 times)

Offline Stefann

  • Jr. Member
  • **
  • Posts: 78
Re: Rsyslog not working
« Reply #15 on: October 12, 2024, 08:28:57 AM »
Thanks patrikg!
That got me sparked again.

Solved it.
the rotate command was correctly called by rsyslogd but... the files in the rotate script needed a full path description

Code: [Select]
rotate script in syslog.conf is called with logfile as argument
$outchannel debug_log,/var/log/debuglog.txt, 100000, /var/log/rotate debuglog.txt

rotate script itself creates full path:
tail -n 500 /var/log/${1} > /var/log/${1}.tmp
mv -f /var/log/${1}.tmp /var/log/${1}

and its working. thanks for the spark

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Rsyslog not working
« Reply #16 on: October 12, 2024, 10:05:31 AM »
@Stefann You welcome.

Happy Hacking and happy weekend