summarylogtreecommitdiffstats
path: root/ib-gw
diff options
context:
space:
mode:
authorBen Alex2018-05-08 06:51:00 +1000
committerBen Alex2018-05-08 06:51:00 +1000
commit6c3bc49d4e0cc6b16c77080d357adafa584a595c (patch)
treec8830548fe0b115a2f740895d1f620fc856434d7 /ib-gw
parent5611e2b4581889ea4e1cf265f34e81dd3fcd2dd7 (diff)
downloadaur-6c3bc49d4e0cc6b16c77080d357adafa584a595c.tar.gz
Allow user customisation of startup parameters
Diffstat (limited to 'ib-gw')
-rwxr-xr-xib-gw8
1 files changed, 6 insertions, 2 deletions
diff --git a/ib-gw b/ib-gw
index f66e779c2d2..41005558f7a 100755
--- a/ib-gw
+++ b/ib-gw
@@ -1,4 +1,8 @@
#!/bin/bash
-cd /usr/share/ib-tws/jars
-/usr/share/ib-tws/jre/bin/java -cp \* -Xmx512M -Dsun.java2d.noddraw=true ibgateway.GWClient $HOME/.ib-tws
+# Load system-wide settings and per-user overrides
+. /etc/ib-gw.conf
+[[ -f $HOME/.config/ib-gw.conf ]] && . $HOME/.config/ib-gw.conf
+
+cd /usr/share/ib-tws/jars
+/usr/share/ib-tws/jre/bin/java -cp \* $JAVA_FLAGS ibgateway.GWClient $IB_CONFIG_DIR