modify build script for init script