A railroad company or city, town, or county failing to comply with an order of the commissioner of transportation that is not appealed from or, if appealed from, affirmed in whole or in part, is liable to a penalty of $50 for every day of noncompliance, to be collected in civil action brought by the attorney general.