BEVERLY HILLS—On September 24, actress and singer Lindsay Lohan was released from jail after posting $300,000 bail, in accordance with a new court ruling.

Lohan had initially been in custody with an expectation to serve 30 days afterLos Angeles Superior Court Judge Elden S. Fox refused to set bail, andordered that the 24-year-old remain in jail until her next scheduledhearing on October 22.

The new hearing will determine if Lohan should serve time in connection with a court-mandated drug test that indicated that Lohan had used cocaine.  The alleged cocaine use is in violation of her probation, which stems from a previous D.U.I.  However, Lohan’s attorney, Shawn Chapman Holley, reportedly appealed for the celebrity’s right to bail, arguing that Lohan could not be held in custody for a misdemeanor violation.

Superior Court Judge Patricia Schnegg allowed Lohan to post bail, and she was released later in the day with orders to wear a SCRAM alcohol-detection bracelet, avoid entering clubs and other businesses that sell alcohol, and avoid association with people who abuse drugs.

Her next court hearing remains slated for October 22 to address the alleged probation violation.

Lohan has starred in movies such as “The Parent Trap” (1998), “A Prairie Home Companion” (2006), “Bobby” (2006), “Just My Luck” (2006) and “Labor Pains” (2009).  She is also known for her songs, “A Little More Personal” (2005), “Can’t Stop, Won’t Stop” (2010) and “Rumors” (2004).

In her most recent Twitter posts, Lohan writes: “I am so thankful for the support of my fans, loved ones and immediate family, who understand that I am trying hard, but also that I am a work in progress, just as anyone else.  I am keeping my faith, and I am hopeful. Thank you all!”