rougail/upgrade/pre_download/10-rsyslog

19 lines
410 B
Plaintext
Raw Normal View History

2019-11-23 08:17:35 +01:00
#!/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