Terminate init.sh and return error when error occured