diff --git a/advanced/pihole-FTL.service b/advanced/pihole-FTL.service index a2cbbab1..30cd140f 100644 --- a/advanced/pihole-FTL.service +++ b/advanced/pihole-FTL.service @@ -13,11 +13,11 @@ FTLUSER=pihole PIDFILE=/var/run/pihole-FTL.pid get_pid() { - cat "$PIDFILE" + pidof "pihole-FTL" } is_running() { - [ -f "$PIDFILE" ] && ps "$(get_pid)" > /dev/null 2>&1 + ps "$(get_pid)" > /dev/null 2>&1 } # Start the service