[nginx-update.sh] Some fixes and improvements