10 lines
176 B
Bash
Executable File
10 lines
176 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
|
|
for file in /etc/logrotate.d/* ; do
|
|
if grep -Eq "(^|[^#y])compress" "$file" ; then
|
|
sed -i -r "s/(^|[^#y])(compress)/\1#\2/" "$file"
|
|
fi
|
|
done
|