https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42468 --- Comment #1 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 198356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198356&action=edit Bug 42468: Add systemd support for OCLC Connexion daemon Koha ships an OCLC Connexion import daemon that listens for connections from OCLC Connexion client or WorldShare Record Manager and creates records in Koha. For some reason, this daemon was never bundled into koha-common with a helper script and an init unit. As a result, sites using Connexion have had to roll their own service files and manage the daemon manually. Bug 40901 introduced koha-systemd with native systemd templates for the existing services (plack, sip, zebra, indexer, etc.) and the systemd abstraction in koha-functions.sh. This patch adds Connexion to that framework so it can be enabled, disabled, started, stopped, restarted, and queried just like SIP. Tthe SysV init script (koha-sysv.init) starts/stops/reloads/checks status of the daemon for instances with it enabled, koha-systemd-ctl lists connexion as a known service, koha-create-dirs@.service runs Before= the new unit, and bash completion is wired up. Test Plan: 1) Apply this patch 2) Restart all the things! 3) Pick an instance you can test against ( e.g. kohadev ) 4) Create /etc/koha/sites/kohadev/connexion.conf with the minimum required settings (see /usr/share/koha/bin/connexion_import_daemon.pl --help): port: 5500 koha: http://localhost:8080 user: koha password: koha 5) Run: koha-connexion --enable kohadev 6) Note the helpful hint about creating connexion.conf if missing 7) Run: koha-connexion --start kohadev 8) Run: koha-connexion --status kohadev Note that the daemon is running! 9) Run: systemctl status koha-connexion@kohadev.service Note that systemd reports the daemon as active! 10) From another terminal, telnet to port 5500 and send a Connexion request, or use a real OCLC Connexion client to send a record 11) Note the record arrives in Koha (in the staging area or directly in the catalog, depending on import_mode)! 12) Run: koha-connexion --restart kohadev Note that the daemon restarts cleanly 13) Run: koha-list --connexion Note that kohadev is listed! 14) Run: koha-list --noconnexion Note that kohadev is NOT listed 15) Run: koha-connexion --stop kohadev 16) Run: koha-connexion --disable kohadev Note that the daemon is stopped and disabled 17) Run: koha-list --connexion Note that kohadev is no longer listed 18) Re-enable, then disable the entire instance: koha-connexion --enable kohadev koha-connexion --start kohadev koha-disable kohadev Note that the Connexion daemon is also stopped and disabled! 19) Re-enable the instance and the daemon, then run koha-remove on a throw-away instance and confirm the daemon is cleanly torn down Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.