LOS ANGELES -- A judge sentenced Lindsay Lohan on Wednesday to 30 days in jail and warned the actress there would be plenty more time behind bars if she violated further court orders.

Superior Court Judge Stephanie Sautner imposed the complicated new sentence, telling Lohan she would have to serve more than 400 hours of community service at the county morgue, undergo counseling sessions and report to court frequently to avoid further jail time.

In all, Sautner sentenced Lohan to 300 days in jail for violating a court order, but said the actress would serve the additional 270 days only if there was another violation.

In reality, the initial 30-day sentence will be significantly shortened by jail overcrowding, with Lohan likely serving only about six days. The length of the term will be set by the Sheriff's Department.

The actress has until Nov. 9 to report for her jail term. Lohan, 25, acknowledged violating her probation by being terminated from a community service assignment at a women's shelter earlier this year and missing psychotherapy sessions that the judge previously ordered.