I just want to check I'm not going bonkers.
From the logrotate man page:
--------------- preremove script endscript The script is executed once just before removal of a log file. logrotate will pass the name of file which is soon to be removed as the first argument to the script. See also firstaction and the SCRIPTS section. -------------- So it sounds reasonable to expect "script" to be invoked with one argument, the name of the to-be-removed file. Right? the logrotate config - it is a test-setup, for rotating /var/log/testfile when it exceeds 1k, without date extension. ---------------- /var/log/testfile { compress nodateext maxage 365 rotate 5 missingok notifempty size 1k sharedscripts postrotate /usr/bin/true endscript preremove /usr/local/bin/archive_logfile.sh endscript } ------------------- My script /usr/local/bin/archive_logfile.sh contains #!/bin/sh test -n "$1" || exit 75 log="$1" plus the rest When I run a logrotate (either with systemd or manually), it does invoke the preremove script, but without the filename as argument, so my script leaves with a 75. -- Per Jessen, Zürich (12.9°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes