File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22# ## ++++++++++++++++++++++++++++++++++++++++++++++
3- # # Config file to setup IB-Container
3+ # # Config file to setup IB-Container +++
44# ## ++++++++++++++++++++++++++++++++++++++++++++++
55
66# ## tws/gateway credentials
@@ -14,19 +14,19 @@ SSH_MIDDLEMAN_SERVER=
1414SSH_MIDDLEMAN_USER=
1515SSH_PORT_NUMBER=
1616
17- # ## Name of Containers
17+ # ## Name of Container
1818CONTAINER=
1919
2020# ## Welche Software soll genutzt werden
2121# ## Es kann entweder der IB-Gateway oder die TWS als API-Server genutzt werden.
2222# ## Die TWS kann entweder im Gatewaymodus oder als klassische GUI gestartet werden
2323
2424# ## Which program should be used
25- # ## Either IB-Gateway or TWS are suitable
25+ # ## Either 'ibgateway' or 'tws' are suitable
2626# ## TWS can be started either as non-GUI Gateway or in classical GUI-Mode
2727
2828PRODUCT=tws # ibgateway or tws # do not change, actually only tws is supported
29- INSTANCE=gateway # gateway or tws #
29+ INSTANCE=tws # gateway or tws # attention: the tws-output is displayed on the host of ib-container
3030
3131IB_PROGRAM=$PRODUCT -latest-standalone-linux-x64.sh
3232IB_PATH=https://download2.interactivebrokers.com/installers/$PRODUCT /latest-standalone/$IB_PROGRAM
@@ -60,6 +60,9 @@ SSH_TUNNEL_LOCATION="etc/network/if-up.d/reverse_ssh_tunnel"
6060# ## Alle Ausgaben in die Datei containerbau.log umleiten
6161logfile=containerbau.log
6262
63+ # ## Weitere Software
64+ # ## Liste von Debian-Paketnanen
65+ INSTALL_ADDITONAL_PROGRAMS= # "vim"
6366
6467# ### return codes
6568# ##
Original file line number Diff line number Diff line change @@ -315,15 +315,21 @@ install_simple_monitor(){
315315 $access_container sudo apt-get install -y software-properties-common
316316 $access_container sudo apt-add-repository -y ppa:rael-gc/rvm
317317 $access_container sudo apt-get update
318- $access_container sudo apt-get install -y rvm elinks git tmux # vim
318+ $access_container sudo apt-get install -y rvm elinks git tmux $INSTALL_ADDITONAL_PROGRAMS
319319 $access_container sudo usermod -a -G rvm ubuntu
320320 $access_container rvm install $RUBY_VERSION
321321 $access_container gem install bundler
322322 $access_container git clone $SIMPLE_MONITOR
323323
324324 lxc file push install_simple_monitor.sh $CONTAINER /home/ubuntu/
325325 if [ $DEMOACCOUNT -eq 0 ] ; then
326+ if [ " $INSTANCE " = tws ] ; then
327+ $access_container sed -in ' s/:host: localhost/&:7496/g' /home/ubuntu/simple-monitor/config.yml
328+ else
326329 $access_container sed -in ' s/:host: localhost/&:4001/g' /home/ubuntu/simple-monitor/config.yml
330+ fi
331+ elif [ " $INSTANCE " = tws ] ; then
332+ $access_container sed -in ' s/:host: localhost/&:7497/g' /home/ubuntu/simple-monitor/config.yml
327333 fi
328334 $access_container ./install_simple_monitor.sh
329335 } >> $SILENT
You can’t perform that action at this time.
0 commit comments