Rewrite start scripts in bash