Only remove the cron.d file if it exists

Signed-off-by: Matt Winter <MattWinter@gmail.com>
This commit is contained in:
Matt Winter 2021-04-16 12:36:09 -04:00
parent fa771f74fd
commit 1633a976a4
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ if [ -z "$SKIPGRAVITYONBOOT" ]; then
echo '@reboot root PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updateGravity >/var/log/pihole_updateGravity.log || cat /var/log/pihole_updateGravity.log' > /etc/cron.d/gravity-on-boot
else
echo " Skipping Gravity Database Update."
rm /etc/cron.d/gravity-on-boot &>/dev/null
[ ! -e /etc/cron.d/gravity-on-boot ] || rm /etc/cron.d/gravity-on-boot &>/dev/null
fi
# Kill dnsmasq because s6 won't like it if it's running when s6 services start