aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Alex2019-04-29 08:42:46 +1000
committerBen Alex2019-04-29 09:13:02 +1000
commitbb23dd67ca86d64b0ac8376fa65a2fa14416ce24 (patch)
tree27f671bbb77aa0a750b53517cf9cb23b92fd0c5c
parent77d67f7d65025641680f1b51b06aab080c8ca7fe (diff)
downloadaur-bb23dd67ca86d64b0ac8376fa65a2fa14416ce24.tar.gz
Full refactor to IBC 3.7.5
-rw-r--r--.SRCINFO35
-rw-r--r--PKGBUILD38
-rw-r--r--README.md83
-rw-r--r--edemo.ini62
-rw-r--r--fdemo.ini62
-rw-r--r--ibc@.service (renamed from ibcontroller@.service)4
6 files changed, 115 insertions, 169 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d4a85237b868..1324b4945267 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,8 @@
-# Generated by mksrcinfo v8
-# Wed Dec 27 01:26:06 UTC 2017
-pkgbase = ib-controller
- pkgdesc = Manages headless Interactive Brokers IB Gateway instances
- pkgver = 3.4.3
+pkgbase = ibc
+ pkgdesc = Manages headless Interactive Brokers IB Gateway instances (formerly known as IB Controller)
+ pkgver = 3.7.5
pkgrel = 1
- url = https://github.com/ib-controller/ib-controller
+ url = https://github.com/IbcAlpha/IBC
arch = any
license = GPL3
depends = ib-tws
@@ -15,18 +13,19 @@ pkgbase = ib-controller
depends = libxtst
depends = gsettings-desktop-schemas
depends = ttf-dejavu
- backup = etc/ibcontroller/fdemo.ini
- backup = etc/ibcontroller/edemo.ini
- source = https://github.com/ib-controller/ib-controller/releases/download/3.4.0/IBController-3.4.0.zip
- source = https://github.com/ib-controller/ib-controller/raw/master/resources/IBController.jar
- source = fdemo.ini
+ replaces = ib-controller
+ backup = etc/ibc/fdemo.ini
+ backup = etc/ibc/edemo.ini
+ source = https://github.com/IbcAlpha/IBC/releases/download/3.7.5/IBCLinux-3.7.5.zip
+ source = https://github.com/IbcAlpha/IBC/raw/3.7.5/resources/IBC.jar
source = edemo.ini
- source = ibcontroller@.service
- md5sums = 4e91b8df02123842aef9f211c5e0a4ff
- md5sums = 7e1c811c0f6bb1bdc7e98ca77d8676bf
- md5sums = 981aa279128e5638f649ca9e7ab23011
- md5sums = 547d187f535c8230a2d4cff4d2d899f2
- md5sums = f1038408283433b18a5cb39b30019fe6
+ source = fdemo.ini
+ source = ibc@.service
+ md5sums = 0f3889c105ebb679e186ff593d2fad3c
+ md5sums = dd29abc1db10ea9bfbdec1cb3abe3550
+ md5sums = 630e17a3776f0795b929603a6b35316d
+ md5sums = 1bd30d4fe0a778c4d5fef526e52a9150
+ md5sums = e4cc6b5177719502cbcd9ea3a0152eab
-pkgname = ib-controller
+pkgname = ibc
diff --git a/PKGBUILD b/PKGBUILD
index f9142fa8c208..d91551b84911 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,31 @@
# Maintainer: Ben Alex <ben.alex@acegi.com.au>
-pkgname=ib-controller
-pkgver=3.6.0
+pkgname=ibc
+pkgver=3.7.5
pkgrel=1
-pkgdesc='Manages headless Interactive Brokers IB Gateway instances (IBC fork)'
+pkgdesc='Manages headless Interactive Brokers IB Gateway instances (formerly known as IB Controller)'
+replaces=('ib-controller')
arch=('any')
url="https://github.com/IbcAlpha/IBC"
license=('GPL3')
depends=(ib-tws xorg-server-xvfb xorg-server gtk2 libxrender libxtst gsettings-desktop-schemas ttf-dejavu)
-backup=('etc/ibcontroller/fdemo.ini'
- 'etc/ibcontroller/edemo.ini')
-source=('https://github.com/IbcAlpha/IBC/releases/download/3.6.0/IBCLinux-3.6.0.zip'
- 'https://github.com/IbcAlpha/IBC/raw/master/resources/IBC.jar'
- 'fdemo.ini'
+backup=('etc/ibc/fdemo.ini'
+ 'etc/ibc/edemo.ini')
+source=("https://github.com/IbcAlpha/IBC/releases/download/${pkgver}/IBCLinux-${pkgver}.zip"
+ "https://github.com/IbcAlpha/IBC/raw/${pkgver}/resources/IBC.jar"
'edemo.ini'
- 'ibcontroller@.service')
-md5sums=('055c4fab1a8ceeb9c70cca9e2fb43eda'
- 'c9d9756004a08358b3861b591900f782'
- '981aa279128e5638f649ca9e7ab23011'
- '547d187f535c8230a2d4cff4d2d899f2'
- 'cb2808018dba2880b2b4882d81fe8ac2')
-
+ 'fdemo.ini'
+ 'ibc@.service')
+md5sums=('0f3889c105ebb679e186ff593d2fad3c'
+ 'dd29abc1db10ea9bfbdec1cb3abe3550'
+ '630e17a3776f0795b929603a6b35316d'
+ '1bd30d4fe0a778c4d5fef526e52a9150'
+ 'e4cc6b5177719502cbcd9ea3a0152eab')
package() {
- install -Dm644 ${srcdir}/IBC.jar ${pkgdir}/usr/share/java/ibcontroller/IBC.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
+ install -Dm644 ${srcdir}/IBC.jar ${pkgdir}/usr/share/java/ibc/IBC.jar
+ install -Dm600 ${srcdir}/fdemo.ini ${pkgdir}/etc/ibc/fdemo.ini
+ install -Dm600 ${srcdir}/edemo.ini ${pkgdir}/etc/ibc/edemo.ini
+ install -Dm644 ${srcdir}/ibc@.service ${pkgdir}/usr/lib/systemd/system/ibc@.service
}
diff --git a/README.md b/README.md
index 16f222ab4591..cf1bcea64e1b 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
IBController AUR
=================
Source and documentation for the
-[IBController](https://github.com/ib-controller/ib-controller)
-AUR package [ib-controller](https://aur.archlinux.org/packages/ib-controller/).
+[IBC](https://github.com/IbcAlpha/IBC)
+AUR package [ibc](https://aur.archlinux.org/packages/ibc/).
This allows you to control [Interactive Brokers](http://interactivebrokers.com/)
[Trader Workstation](http://www.interactivebrokers.com/en/pagemap/pagemap_APISolutions.php).
@@ -12,21 +12,21 @@ of IBController and a headless
[systemd](http://en.wikipedia.org/wiki/Systemd) configuration that supports
multiple concurrent IB Gateway instances while addressing usual security needs.
-To start IBController and the IB Gateway it manages, create an INI file in
-``/etc/ibcontroller`` and use systemd commands such as:
+To start IBC and the IB Gateway it manages, create an INI file in
+``/etc/ibc`` and use systemd commands such as:
```
-sudo systemctl start ibcontroller@ininame.service
-sudo systemctl enable ibcontroller@ininame.service
+sudo systemctl start ibc@ininame.service
+sudo systemctl enable ibc@ininame.service
```
-The aforementioned ``ininame`` should be the simple name of an ``/etc/ibcontroller``
-INI file. For example, use ``ibcontroller@fdemo.service`` for the included
+The aforementioned ``ininame`` should be the simple name of an ``/etc/ibc``
+INI file. For example, use ``ibc@fdemo.service`` for the included
[financial advisor sample INI file](package/fdemo.ini),
-or ``ibcontroller@edemo.service`` for the included
+or ``ibc@edemo.service`` for the included
[individual user sample INI file](package/edemo.ini). Both sample INI files can
be used concurrently, as they bind to unique ports. Please refer to the
-[IBController](https://github.com/ib-controller/ib-controller) documentation for
+[Ibc](https://github.com/IbcAlpha/IBC) documentation for
the meaning of individual INI configuration settings.
Please note future updates to this package may change the sample INI files to
@@ -34,56 +34,10 @@ reflect new configuration defaults. You should create your own
INI file(s) rather than editing one of the shipped INI files. Similarly the
systemd configuration file may be changed in future updates.
-Monitoring
-----------
-If you'd like to monitor your IBController is running and IB API is available,
-[Monit](http://mmonit.com/monit/) is recommended. It's easily installed with
-``sudo pacman -S monit``. Edit the ``/etc/monitrc`` file and add lines like:
-
-```
-set daemon 60
-set mailserver mail.someisp.com
-set alert you@you.com not on { instance, action }
-
-check process ib-api-fdemo matching 'xvfb.*java.*fdemo.ini'
- start program = "/usr/sbin/systemctl start ibcontroller@fdemo.service"
- stop program = "/usr/sbin/systemctl stop ibcontroller@fdemo.service"
- if failed host 127.0.0.1 port 4002
- send "63\0x0071\0x001\0x005556\0x00" # clientVer\startAPI\startApiVer\5556
- expect "[0-9]{2,}" # serverVer reply
- send "49\0x001\0x00" # reqCurrTime\reqCurrTimeVer
- expect "49" # serverTime reply
- then restart
-```
-
-In the above:
-
-* The ``daemon`` statement causes service monitoring every 60 seconds.
-* The ``matching`` regular expression detects the ``fdemo.ini`` IBController
- process. Monit will then report additional statistics in the Monit interface
- (eg CPU/RAM use) plus detect if the process is not running.
-* The ``if failed host`` check on port ``4002`` performs an IB API connection
- handshake and requests the server time. This offers confidence IB API is
- running.
-* The ``restart`` directive will both restart the service and send an email if
- there is any issue detected.
-
-Don't forget you'll need to start Monit after editing the ``/etc/monitrc``:
-
-```
-sudo systemctl start monit
-sudo systemctl enable monit
-```
-
-You can use [http://localhost:2812/](http://localhost:2812/) (default username
-``admin``, password ``monit``) to access the Monit GUI.
-
Security
--------
-Always ensure the ``/etc/ibcontroller`` INI files are only readable by ``root``,
-as they contain your IB credentials. If you require additional credential safety
-you may like to consider the IBController ``PasswordEncrypted`` option, however
-it is easily decrypted and therefore not used in the sample files.
+Always ensure the ``/etc/ibc`` INI files are only readable by ``root``,
+as they contain your IB credentials.
There is no mechanism to use IB hardware security tokens with the systemd
configuration. This is due to the systemd configuration using a virtual
@@ -100,14 +54,11 @@ Build and Test
If you'd like to try out changes to the package, these commands offer a start:
````
-rm -rf pkg src *.xz *.zip && makepkg -f
-namcap -m *.xz
+rm -rf pkg src *.xz *.zip
+makepkg -f
sudo pacman -U *.xz
sudo systemctl daemon-reload
-sudo systemctl start ibcontroller@fdemo.service
-sudo systemctl status ibcontroller@fdemo.service
-sudo systemctl stop ibcontroller@fdemo.service
-mksrcinfo
-git add
-git push
+sudo systemctl start ibc@fdemo.service
+sudo systemctl status ibc@fdemo.service
+sudo systemctl stop ibc@fdemo.service
````
diff --git a/edemo.ini b/edemo.ini
index 86143a2afd50..ad4a65d5cde4 100644
--- a/edemo.ini
+++ b/edemo.ini
@@ -1,33 +1,31 @@
# Options that should be unique to each instantiated service
-IbLoginId=edemo
-IbPassword=demouser
-TradingMode=paper
-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
-AcceptNonBrokerageAccountWarning=yes
-ReadOnlyLogin=no
-SaveTwsSettingsAt=
-LogComponents=never
+IbLoginId=edemo
+IbPassword=demouser
+TradingMode=paper
+OverrideTwsApiPort=4003
+CommandServerPort=7464
+IbDir=/var/run/ibc/tws/edemo
+
+# Options that rarely require changes
+LogToConsole=no
+FIX=no
+FIXLoginId=
+FIXPassword=
+StoreSettingsOnServer=no
+MinimizeMainWindow=yes
+ExistingSessionDetectedAction=primary
+AcceptIncomingConnectionAction=accept
+ShowAllTrades=no
+IbAutoClosedown=no
+ClosedownAt=
+AllowBlindTrading=yes
+DismissPasswordExpiryWarning=yes
+DismissNSEComplianceNotice=yes
+ControlFrom=
+BindAddress=127.0.0.1
+CommandPrompt=
+SuppressInfoMessages=yes
+AcceptNonBrokerageAccountWarning=yes
+ReadOnlyLogin=no
+SaveTwsSettingsAt=
+LogComponents=never
diff --git a/fdemo.ini b/fdemo.ini
index bf66eee5ab0d..1f2d8e8ddedc 100644
--- a/fdemo.ini
+++ b/fdemo.ini
@@ -1,33 +1,31 @@
# Options that should be unique to each instantiated service
-IbLoginId=fdemo
-IbPassword=demouser
-TradingMode=paper
-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
-AcceptNonBrokerageAccountWarning=yes
-ReadOnlyLogin=no
-SaveTwsSettingsAt=
-LogComponents=never
+IbLoginId=fdemo
+IbPassword=demouser
+TradingMode=paper
+OverrideTwsApiPort=4002
+CommandServerPort=7463
+IbDir=/var/run/ibc/tws/fdemo
+
+# Options that rarely require changes
+LogToConsole=no
+FIX=no
+FIXLoginId=
+FIXPassword=
+StoreSettingsOnServer=no
+MinimizeMainWindow=yes
+ExistingSessionDetectedAction=primary
+AcceptIncomingConnectionAction=accept
+ShowAllTrades=no
+IbAutoClosedown=no
+ClosedownAt=
+AllowBlindTrading=yes
+DismissPasswordExpiryWarning=yes
+DismissNSEComplianceNotice=yes
+ControlFrom=
+BindAddress=127.0.0.1
+CommandPrompt=
+SuppressInfoMessages=yes
+AcceptNonBrokerageAccountWarning=yes
+ReadOnlyLogin=no
+SaveTwsSettingsAt=
+LogComponents=never
diff --git a/ibcontroller@.service b/ibc@.service
index 8e7921281b5a..467b53451865 100644
--- a/ibcontroller@.service
+++ b/ibc@.service
@@ -1,5 +1,5 @@
[Unit]
-Description=IBController
+Description=IBC
After=network.target
[Service]
@@ -11,7 +11,7 @@ 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 /usr/share/ib-tws/jre/bin/java -cp /usr/share/ib-tws/jars/*:/usr/share/java/ibcontroller/IBC.jar -Xmx512M ibcalpha.ibc.IbcGateway /etc/ibcontroller/%I.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/ibc/IBC.jar -Xmx512M ibcalpha.ibc.IbcGateway /etc/ibc/%I.ini
[Install]
WantedBy=multi-user.target