Bug#950386: zookeeperd: missing-systemd-service-for-init.d-script

Andreas Henriksson andreas at fatal.se
Fri Jan 31 22:16:43 GMT 2020


Package: zookeeperd
Version: 3.4.13-3
Severity: normal

Dear Maintainer,

Please consider adding a native systemd service masking the shipped init
script (fixes lintian tag[1] in subject).

I'm attaching a completely untested attempt at writing a service file to
be shipped in the zookeeperd package (e.g. by placing it in
debian/zookeeperd.zookeeper.service should make debhelper DTRT). Please
feel free to ask for additional help, as I'm happy to help if you
provide testing and review (as I don't personally use zookeeper).

For extra bonus points please look into security hardening[2] the service
by restricting what it can access from the system.

Regards,
Andreas Henriksson

PS. You might want to create a /usr/sbin/zookeeper-server symlink
and use that in the service file instead (similar to the other symlinks
you create). And IMHO the /usr/share/zookeeper/bin/* files would feel
more naturally placed in /usr/libexec/zookeeper/*.

[1]: https://lintian.debian.org/tags/missing-systemd-service-for-init.d-script.html
[2]: https://lintian.debian.org/tags/systemd-service-file-missing-hardening-features.html
-------------- next part --------------
[Unit]
Description=Coordination service for distributed applications
After=network.target syslog.target

[Service]
Type=simple
ExecStart=/usr/share/zookeeper/bin/zkServer.sh start-foreground
# Alternatively:
#Type=forking
#ExecStart=/usr/share/zookeeper/bin/zkServer.sh start
#ExecStop=/usr/share/zookeeper/bin/zkServer.sh stop
#PIDFile=/run/zookeeper/zookeeper.pid
#Environment=ZOOPIDFILE=/run/zookeeper/zookeeper.pid
#RuntimeDirectory=zookeeper
EnvironmentFile=-/etc/default/zookeeper
User=zookeeper
Group=zookeeper
SyslogIdentifier=zookeeper
Restart=on-failure
# TODO: security hardening settings

[Install]
WantedBy=multi-user.target


More information about the pkg-java-maintainers mailing list