Bail for a person accused of an offense against a municipality shall be governed by the provisions of this article applicable to a justice, except that the bail may be deposited with the mayor or with such other officer of the municipality as may be designated by the mayor or other chief executive officer of the municipality, and proceedings for forfeiture shall be prosecuted in the name and for the benefit of the municipality.