10 May
2023
10 May
'23
11:41
Andrei Borzenkov wrote:
logrotate calls
sh -c "script content" xxx log-file-name
where script content is literal text between preremove'/endscript. So it ends up calling /usr/local/bin/archive_logfile.sh without parameters. You need
preremove /usr/local/bin/archive_logfile.sh $1 endscript
Thanks!!!! that did the trick. It had never occured to me that the _contents_ between preremove and endscript would be called like that. -- Per Jessen, Zürich (16.8°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes