19 lines
410 B
Bash
Executable File
19 lines
410 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Remove autogenerated configuration files
|
|
DO_NOT_TOUCH_REGEXP='eole_templates\|default'
|
|
|
|
for conf in $(find /etc/rsyslog.d/ -type f -name '*.conf')
|
|
do
|
|
if echo "${conf}" | grep -qs "${DO_NOT_TOUCH_REGEXP}"
|
|
then
|
|
# Do nothing
|
|
continue
|
|
fi
|
|
if ! dpkg -S "${conf}" > /dev/null 2>&1
|
|
then
|
|
echo "Remove generated rsyslog configuration file: “${conf}”"
|
|
rm -f "${conf}"
|
|
fi
|
|
done
|