If any provision of this chapter is being violated, the city or town supplied with the water or a corporation owning waterworks for the purpose of supplying the city or town or the inhabitants thereof with water may, by civil action in the superior court of the proper county, have the maintenance of the nuisance which pollutes or tends to pollute the said water, enjoined and such injunction may be perpetual.