Changed the order to install java before teamcity.
Accept errorcode 1 for bash scripts for the teamcity service installation, since an error is given if the script is run a second time or more.