Such keeper shall have the power of a police officer and shall receive the compensation to be fixed by the selectmen upon his appointment. For the expenses of detention and support of each person committed, shown by the officer's return to have been actually detained in the lockup, there may be charged upon the precept, if any, and paid to the town, not more than fifty dollars for each day or fraction thereof.
Mass. Gen. Laws ch. 40, § 36