write init script