issue #1108: add two method cleanScript and restart

issue #1108: add two method cleanScript and restart