Improve deployment script and add app/var to init.sh