conditionning the stop and undeploy targets