summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Alex2015-06-10 13:48:40 +1000
committerBen Alex2015-06-10 13:48:40 +1000
commit05eb84d7da4b9536ea5f3540264b84e2612eafa8 (patch)
treed302310706f1631c9c2998a8a96b2a9229867b30
downloadaur-05eb84d7da4b9536ea5f3540264b84e2612eafa8.tar.gz
Initial import
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD29
-rw-r--r--edemo.ini29
-rw-r--r--fdemo.ini29
-rw-r--r--ibcontroller@.service17
5 files changed, 130 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..2207f762bbc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = ib-controller
+ pkgdesc = Manages headless Interactive Brokers IB Gateway instances
+ pkgver = 2.12
+ pkgrel = 3
+ url = https://github.com/benalexau/ibcontroller-aur
+ arch = any
+ license = GPL3
+ depends = ib-tws
+ depends = xorg-server-xvfb
+ depends = xorg-server
+ depends = gtk2
+ depends = libxrender
+ depends = libxtst
+ depends = gsettings-desktop-schemas
+ depends = ttf-dejavu
+ source = https://github.com/ib-controller/ib-controller/releases/download/2.12.2/IBController-2.12.2.zip
+ source = fdemo.ini
+ source = edemo.ini
+ source = ibcontroller@.service
+ md5sums = 71cf5d83257a454f3157d64cbeb49f59
+ md5sums = 8e8a058f3cecc490db9b1a5368624b06
+ md5sums = 77d02d9b5cbcd1ad3f37d116f1f217e1
+ md5sums = 2ce6f7efe6ce6f38c1ad8d9e5e1cc7ae
+
+pkgname = ib-controller
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..cb0a41df34c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Ben Alex <ben.alex@acegi.com.au>
+
+# Using GitHub as upstream URL instead of IBController, as GitHub has lots of docs on usage to assist users.
+
+pkgname=ib-controller
+pkgver=2.12
+pkgrel=3
+pkgdesc='Manages headless Interactive Brokers IB Gateway instances'
+arch=('any')
+url="https://github.com/benalexau/ibcontroller-aur"
+license=('GPL3')
+depends=(ib-tws xorg-server-xvfb xorg-server gtk2 libxrender libxtst gsettings-desktop-schemas ttf-dejavu)
+
+source=('https://github.com/ib-controller/ib-controller/releases/download/2.12.2/IBController-2.12.2.zip'
+ 'fdemo.ini'
+ 'edemo.ini'
+ 'ibcontroller@.service')
+md5sums=('71cf5d83257a454f3157d64cbeb49f59'
+ '8e8a058f3cecc490db9b1a5368624b06'
+ '77d02d9b5cbcd1ad3f37d116f1f217e1'
+ '2ce6f7efe6ce6f38c1ad8d9e5e1cc7ae')
+
+
+package() {
+ install -Dm644 ${srcdir}/IBController/IBController.jar ${pkgdir}/usr/share/java/ibcontroller/ibcontroller.jar
+ install -Dm600 ${srcdir}/fdemo.ini ${pkgdir}/etc/ibcontroller/fdemo.ini
+ install -Dm600 ${srcdir}/edemo.ini ${pkgdir}/etc/ibcontroller/edemo.ini
+ install -Dm644 ${srcdir}/ibcontroller@.service ${pkgdir}/usr/lib/systemd/system/ibcontroller@.service
+}
diff --git a/edemo.ini b/edemo.ini
new file mode 100644
index 00000000000..f03aaf47893
--- /dev/null
+++ b/edemo.ini
@@ -0,0 +1,29 @@
+# Options that should be unique to each instantiated service
+IbLoginId=edemo
+IbPassword=demouser
+ForceTwsApiPort=4003
+IbControllerPort=7464
+IbDir=/var/run/ibcontroller/tws/edemo
+
+# Options that rarely require changes
+LogToConsole=no
+FIX=no
+PasswordEncrypted=no
+FIXLoginId=
+FIXPassword=
+FIXPasswordEncrypted=yes
+StoreSettingsOnServer=no
+MinimizeMainWindow=yes
+ExistingSessionDetectedAction=primary
+AcceptIncomingConnectionAction=accept
+ShowAllTrades=no
+IbAutoClosedown=no
+ClosedownAt=
+AllowBlindTrading=yes
+DismissPasswordExpiryWarning=yes
+DismissNSEComplianceNotice=yes
+IbControlFrom=
+IbBindAddress=127.0.0.1
+CommandPrompt=
+SuppressInfoMessages=yes
+
diff --git a/fdemo.ini b/fdemo.ini
new file mode 100644
index 00000000000..7b8ef6245f2
--- /dev/null
+++ b/fdemo.ini
@@ -0,0 +1,29 @@
+# Options that should be unique to each instantiated service
+IbLoginId=fdemo
+IbPassword=demouser
+ForceTwsApiPort=4002
+IbControllerPort=7463
+IbDir=/var/run/ibcontroller/tws/fdemo
+
+# Options that rarely require changes
+LogToConsole=no
+FIX=no
+PasswordEncrypted=no
+FIXLoginId=
+FIXPassword=
+FIXPasswordEncrypted=yes
+StoreSettingsOnServer=no
+MinimizeMainWindow=yes
+ExistingSessionDetectedAction=primary
+AcceptIncomingConnectionAction=accept
+ShowAllTrades=no
+IbAutoClosedown=no
+ClosedownAt=
+AllowBlindTrading=yes
+DismissPasswordExpiryWarning=yes
+DismissNSEComplianceNotice=yes
+IbControlFrom=
+IbBindAddress=127.0.0.1
+CommandPrompt=
+SuppressInfoMessages=yes
+
diff --git a/ibcontroller@.service b/ibcontroller@.service
new file mode 100644
index 00000000000..fa7201d0785
--- /dev/null
+++ b/ibcontroller@.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=IBController
+After=network.target
+
+[Service]
+Type=simple
+TimeoutSec=0
+User=root
+Group=root
+
+KillMode=control-group
+
+ExecStartPre=/bin/sh -c "mkdir -p /var/run/xvfb"
+ExecStart=/usr/sbin/xvfb-run --auto-servernum -f /var/run/xvfb/%I java -cp /usr/share/java/ib-tws/jts.jar:/usr/share/java/ib-tws/total.2013.jar:/usr/share/java/ibcontroller/ibcontroller.jar -Xmx512M -XX:MaxPermSize=128M ibcontroller.IBGatewayController /etc/ibcontroller/%I.ini
+
+[Install]
+WantedBy=multi-user.target