Any person, coming into a city or town by land from a place infected with a contagious disease, may be compelled to perform quarantine by the health officer and restrained from traveling until discharged; and any person thus restrained, traveling before he is discharged must, on conviction, be fined not less than $100.00.