Skip to content

Commit 72b1686

Browse files
committed
Ability to install additional software
1 parent d9b15a6 commit 72b1686

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

config.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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=
1414
SSH_MIDDLEMAN_USER=
1515
SSH_PORT_NUMBER=
1616

17-
### Name of Containers
17+
### Name of Container
1818
CONTAINER=
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

2828
PRODUCT=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

3131
IB_PROGRAM=$PRODUCT-latest-standalone-linux-x64.sh
3232
IB_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
6161
logfile=containerbau.log
6262

63+
### Weitere Software
64+
### Liste von Debian-Paketnanen
65+
INSTALL_ADDITONAL_PROGRAMS= # "vim"
6366

6467
#### return codes
6568
###

setup.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)