Refactor  and use bash on remote install.sh