In general health districts the prosecuting attorney of the county constituting all or a major part of such district shall act as the legal advisor of the board of health. In a proceeding in which the board is a party the prosecuting attorney of the county in which such proceeding is instituted shall act as the legal representative of the board.