Check the SCRIPT_NAME against the init.d script and not the config file