Add logrotate-ex binary command

This commit is contained in:
2013-05-11 00:09:17 +01:00
parent c7dd047cb4
commit 1d95f8d632

12
bin/logrotate-ex Executable file
View File

@@ -0,0 +1,12 @@
#! /bin/bash
echo "$PATH"
# Parse confx files and generate the conf files.
for file in $HOME/.logrotate.d/*.confx; do
content="$(eval "echo \"$(cat "$file")\"")"
echo "$content" > ${file/%.confx/.conf}
done
# Run logrorate like normal against conf files.
logrotate ~/.logrotate.d/*.conf