From 1d95f8d6327b712b5493de87c5c1e9508b44a308 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 11 May 2013 00:09:17 +0100 Subject: [PATCH] Add logrotate-ex binary command --- bin/logrotate-ex | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bin/logrotate-ex diff --git a/bin/logrotate-ex b/bin/logrotate-ex new file mode 100755 index 0000000..b57c426 --- /dev/null +++ b/bin/logrotate-ex @@ -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