fix startup/shutdown scripts