mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 06:46:40 +00:00
Add logrotate-ex binary command
This commit is contained in:
12
bin/logrotate-ex
Executable file
12
bin/logrotate-ex
Executable 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
|
||||
Reference in New Issue
Block a user