summarylogtreecommitdiffstats
path: root/ibcontroller@.service
diff options
context:
space:
mode:
Diffstat (limited to 'ibcontroller@.service')
-rw-r--r--ibcontroller@.service2
1 files changed, 2 insertions, 0 deletions
diff --git a/ibcontroller@.service b/ibcontroller@.service
index 865445055eb..9291ed04f0b 100644
--- a/ibcontroller@.service
+++ b/ibcontroller@.service
@@ -11,6 +11,8 @@ Group=root
KillMode=control-group
ExecStartPre=/bin/sh -c "mkdir -p /var/run/xvfb"
+ExecStartPre=/bin/sh -c "mkdir -p $(grep -e '^IbDir=' /etc/ibcontroller/%I.ini | tr -cd '\40-\176' | cut -d '=' -f 2)"
+ExecStartPre=/bin/sh -c "echo -e '[IBGateway]\nApiOnly=true" > $(grep -e '^IbDir=' /etc/ibcontroller/%I.ini | tr -cd '\40-\176' | cut -d '=' -f 2)/tws.ini"
ExecStart=/usr/sbin/xvfb-run --auto-servernum -f /var/run/xvfb/%I /usr/share/ib-tws/jre/bin/java -cp /usr/share/ib-tws/jars/*:/usr/share/java/ibcontroller/ibcontroller.jar -Xmx512M ibcontroller.IBGatewayController /etc/ibcontroller/%I.ini
[Install]