Escape the sed command for removing a line in fed/centos lighttpd.conf

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2023-06-12 22:43:39 +01:00
parent d5013bfd6c
commit c39cb8cfe0
No known key found for this signature in database

View file

@ -1010,7 +1010,7 @@ remove_old_pihole_lighttpd_configs() {
if [[ -d "/etc/lighttpd/conf.d" ]]; then if [[ -d "/etc/lighttpd/conf.d" ]]; then
if grep -q -F 'include "/etc/lighttpd/conf.d/pihole-admin.conf"' "${lighttpdConfig}"; then if grep -q -F 'include "/etc/lighttpd/conf.d/pihole-admin.conf"' "${lighttpdConfig}"; then
sed -i '/include "/etc/lighttpd/conf.d/pihole-admin.conf"/d' "${lighttpdConfig}" sed -i '/include "\/etc\/lighttpd\/conf.d\/pihole-admin.conf"/d' "${lighttpdConfig}"
fi fi
if [[ -f "${condfd}" ]]; then if [[ -f "${condfd}" ]]; then