Originally posted by: sailaway
Currently using logrotate rpm 3.14.0-2 downloaded from AIX toolbox on AIX 7.2.
I have a problem when trying to use user home directory expansion in the logrotate.conf.
First I created a testlog in root home directory as "touch ~/testlog"
- If i use the tilde expansion with double quote in the logrotate.conf as follow:
"~/testlog" {}
then the debug will output error:
considering log ~/testlog
error: stat of ~ failed: A file or directory in the path name does not exist.
- If I use tilde expansion without any double quote as follow:
~/testlog {}
then the debug will output error:
error: /etc/logrotate.conf:51 lines must begin with a keyword or a filename (possibly in double quotes)
Is there any workaround to specify home directory as a variable in the logrotate config file?