When any person refuses to obey a legal order given by a director of health, health committee or board of health, or endeavors to prevent it from being carried into effect, a judge of the Superior Court may issue his warrant to a proper officer or to an indifferent person, therein stating such order and requiring him to carry it into effect, and such officer or indifferent person shall execute the same.