Univention Bugzilla – Bug 53337
ADC still uses SysV init script instead of systemd
Last modified: 2024-04-29 09:22:34 CEST
For UCS-5 we switched most services to systemd, but ADC still uses /etc/init.d/univention-ad-connector services/univention-ad-connector/debian/univention-ad-connector.init services/univention-ad-connector/scripts/prepare-new-instance docs/extended-docs/windows-5.0.xml:127
(In reply to Philipp Hahn from comment #0) > For UCS-5 we switched most services to systemd Not really true. We switched: univention-directory-listener, univention-directory-notifier, univention-dhcp, univention-network-manager, univention-system-setup. Missing is still: univention-docker-container-mode, univention-directory-policy univention-management-console-server univention-management-console-web-server univention-demo-configuration univention-ad-connector univention-cloud-init univention-s4-connector debian/univention-saml univention-updater.univention-maintenance univention-firewall
0. This needs to be migrated to a "instantiated" services to support multiple configuration, e.g. 'univention-ad-connector@$configbase'; see <man:systemd.service(5)> 1. ADC should only start *IF* it is already configured, e.g. minimum UCRV "${configbase:-connector}/ad/ldap/host" is set ```console # systemctl status univention-ad-connector ● univention-ad-connector.service - LSB: Univention AD Connector Loaded: loaded (/etc/init.d/univention-ad-connector; generated) Active: failed (Result: exit-code) since Sun 2024-04-28 16:47:37 CEST; 16h ago Docs: man:systemd-sysv-generator(8) Main PID: 31780 (code=exited, status=1/FAILURE) Apr 29 00:38:58 dc20 systemd[1]: /run/systemd/generator.late/univention-ad-connector.service:21: PIDFile= references path below legacy directory /var/run/, updating /var/run/univention-ad-connector → /run/univention-ad-connector; please Apr 29 00:39:00 dc20 systemd[1]: … Apr 29 00:39:01 dc20 systemd[1]: … Apr 29 00:39:03 dc20 systemd[1]: … Apr 29 00:39:20 dc20 systemd[1]: … Apr 29 00:39:32 dc20 systemd[1]: … Apr 29 00:39:36 dc20 systemd[1]: … Apr 29 00:39:38 dc20 systemd[1]: … Apr 29 00:39:39 dc20 systemd[1]: … Apr 29 00:39:41 dc20 systemd[1]: … ``` 2. Nit: Change PIDFile from /var/run/ to /run/ 3. Missing 'exec ' in '/usr/sbin/univention-ad-connector' to get rid of "Mode=forking" 4. If this is migrated to systemd, /usr/share/univention-ad-connector/scripts/prepare-new-instance must also be adapted; currently is copied files shipped via the Debian package; upgrade path for old copies to new services must be handled!