Lindsay Lohan may have been relieved, muttering ‘thank God’ under her breath as she as she left a Los Angeles court room on Wednesday, after a judge sentenced her to 30 days in jail for violating terms of her probation linked to theft and drunken driving charges.

Lohan, whose court appearance was shown through court room television cameras, had failed to turn up nine times at a woman’s shelter to work, telling her probation officer the work was not fulfilling.

Lohan’s court troubles stem earlier violations of her probation on a theft charge in early 2011 and a drunken driving charge in 2007.

After completing her 30-day sentence, which may be less depending on overcrowding conditions, she will be placed under strict probation until April 1.

During that time she must perform community service at the Los Angeles County Morgue and therapy sessions.

Failing to do so will result in Lohan serving 270 days in prison, the time remaining on her sentence.