Maybe this should be a else if, and testing systemd in priority. I'm not sure but I guess /etc/init.d will still be there for some compat thing. But I might be wrong