GULF BREEZE, Fla. (WKRG) — A former Gulf Breeze mayor is avoiding prison time after a second plea deal and sentencing.

71-year-old Edward Gray was originally sentenced to five years in prison. He set up cameras recording 17 and 18-year-old boys showering in his home bathroom after they did work on his house.

The court granted his motion for post-conviction relief after the sentence was stricter than was agreed upon with prosecutors.

A judge on Thursday sentenced him again to about a year and a half, but he gets credit for time served, which means he won’t go back to prison. He’ll serve five years of probation and undergo mental health counseling. He’s also ordered to stay away from public parks and the Gulf Breeze Rec Center.