@@ -101,13 +101,19 @@ else
101101 fi
102102 fi
103103fi
104+ read -p " [?] Gateway Ausgabe in Framebuffer umleiten? [Y/n]:" cont
105+ if [[ -n $cont || $cont == ' n' ]] ; then
106+ TWS_DISPLAY=:0
107+ else
108+ TWS_DISPLAY=:99
109+ fi
104110
105111
106- print_status " ------------------------- "
112+ print_status " ...................................... "
107113print_status " Containter: $CONTAINER "
108114print_status " Login: $LOGIN "
109115print_status " Password: **** " # $PASS"
110- print_tatus " Demoaccount: ` if [ $DEMOACCOUNT -eq 1 ] ; then echo " ja" ; else echo " nein" ; fi ` "
116+ print_status " Demoaccount: ` if [ $DEMOACCOUNT -eq 1 ] ; then echo " ja" ; else echo " nein" ; fi ` "
111117print_status " Gateway/TWS: ` if [ " $PRODUCT " = tws ] ; then echo " $INSTANCE " ; else echo " Gateway" ; fi ` "
112118if [ $SETUP_AUTOSSH -eq 1 ] ; then
113119 print_status " PORT: $SSH_PORT_NUMBER "
@@ -116,15 +122,9 @@ if [ $SETUP_AUTOSSH -eq 1 ] ; then
116122 print_status " Middleman User: $SSH_MIDDLEMAN_USER "
117123else
118124 print_status " SSH-Tunnel wird nicht installiert "
119- print_status " ......................................"
120- fi
121- read -p " [?] Gateway Ausgabe in Framebuffer umleiten? [Y/n]:" cont
122- if [[ -n $cont || $cont == ' n' ]] ; then
123- TWS_DISPLAY=:99
124- else
125- TWS_DISPLAY=:0
126125fi
127126print_status " Ausgabe für Gateway: $TWS_DISPLAY "
127+ print_status " ......................................"
128128read -p " [?] Installieren? [Y/n]:" cont
129129if [[ -n $cont || $cont == ' n' ]] ; then
130130 exit 255
@@ -192,7 +192,7 @@ prepare_lxd(){
192192 lxc profile create gui
193193 lxc profile edit gui < lxdguiprofile.txt
194194 # alias anlegen
195- lxc alias add ubuntu ' exec @ARGS@ -- sudo --login --user ubuntu'
195+ lxc alias add open ' exec @ARGS@ -- sudo --login --user ubuntu'
196196 fi
197197
198198}
@@ -212,7 +212,7 @@ launch_image(){
212212
213213
214214download_ib_software (){
215- istf [ -f $IB_PROGRAM ] ; then
215+ if [ -f $IB_PROGRAM ] ; then
216216 :
217217 else
218218 print_status " Hole $PRODUCT vom offiziellen Server"
@@ -332,21 +332,31 @@ apply_ibc(){
332332 local lxd_display=` $access_container echo $DISPLAY `
333333 # set display , if no DISPLAY setting is found, use :99 (xvfb)
334334 if [ $lxd_display ] ; then
335- :
335+ if [ " $TWS_DISPLAY " == " :0" ] ; then
336+ TWS_DISPLAY=$lxd_display
337+ fi
336338 else
337- $access_container export DISPLAY=:99
338- local lxd_display= ` $access_container echo $DISPLAY `
339+ # $access_container export DISPLAY=:99
340+ TWS_DISPLAY=:99
339341 fi
340342
341343 echo ' START_TIME * * 1-5 export DISPLAY=ibc-display && /bin/bash /home/ubuntu/ibc/gatewaystart.sh -inline' > ibc_cronfile
342- sed -e " 1 s/ibc-display/$lxd_display / " -e " 1 s/START_TIME/$START_TIME / " ibc_cronfile > t_c
343344 if [ $INSTANCE = " tws" ] ; then
344- sed -in ' s/gateway/tws/ ' t_c
345+ sed -in ' s/gateway/tws/ ' ibc_cronfile
346+ sed -in ' s/ibc-display/$lxd_display/ ' ibc_cronfile
347+ else
348+ sed -in " s/ibc-display/$TWS_DISPLAY / " ibc_cronfile
345349 fi
350+ sed -in " s/START_TIME/$START_TIME / " ibc_cronfile
346351
347- lxc file push t_c $CONTAINER /home/ubuntu/ibc_cronfile
348- rm t_c
352+ lxc file push ibc_cronfile $CONTAINER /home/ubuntu/
349353 rm ibc_cronfile
354+ lxc file push start_framebuffer_gateway.sh $CONTAINER /home/ubuntu/
355+ lxc file push start_gateway.sh $CONTAINER /home/ubuntu/
356+ lxc file push kill_gateway.sh $CONTAINER /home/ubuntu/
357+ $access_container chmod a+x start_framebuffer_gateway.sh
358+ $access_container chmod a+x start_gateway.sh
359+ $access_container chmod a+x kill_gateway.sh
350360 $access_container crontab -u ubuntu /home/ubuntu/ibc_cronfile
351361 $access_container rm /home/ubuntu/ibc_cronfile
352362 fi
@@ -481,6 +491,7 @@ run_ats(){
481491 # starte die IB-Software
482492 local access_container=" lxc exec $CONTAINER -- sudo --login --user ubuntu --"
483493 $access_container /home/ubuntu/ibc/${INSTANCE} start.sh -inline &
494+ $access_container /home/ubuntu/ibc/${INSTANCE} start.sh -inline &
484495 sleep 5
485496 $access_container /home/ubuntu/simple-monitor/start-simple-monitor
486497 return 0
@@ -497,7 +508,7 @@ launch_image
497508download_ib_software
498509
499510init_container
500- print_status " +++++++++++++++++++++++++++++++++++++++ "
511+ print_status " ...................................... "
501512print_status " Container ${CONTAINER} ist angelegt "
502513
503514setup_xvfb
0 commit comments