[From nobody Sun Mar  8 21:07:05 2026
Received: (at submit) by bugs.debian.org; 31 Jan 2020 22:16:49 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.2-bugs.debian.org_2005_01_02
 (2018-09-13) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-11.8 required=4.0 tests=BAYES_00, FOURLA, HAS_PACKAGE,
 KHOP_HELO_FCRDNS,RDNS_DYNAMIC,SPF_HELO_NONE,SPF_NONE,TXREP,
 XMAILER_REPORTBUG autolearn=ham autolearn_force=no
 version=3.4.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 25; hammy, 150; neutral, 98; spammy,
 0. spammytokens: hammytokens:0.000-+--H*M:reportbug,
 0.000-+--H*MI:reportbug, 0.000-+--H*x:reportbug, 0.000-+--H*UA:NeoMutt,
 0.000-+--H*u:NeoMutt
Return-path: &lt;ah@fatal.se&gt;
Received: from 94-255-170-6.cust.bredband2.com ([94.255.170.6]:59798
 helo=pi.fatal.se) by buxtehude.debian.org with esmtp (Exim 4.92)
 (envelope-from &lt;ah@fatal.se&gt;) id 1ixean-0000tk-7z
 for submit@bugs.debian.org; Fri, 31 Jan 2020 22:16:49 +0000
Received: by pi.fatal.se (Postfix, from userid 1000)
 id ADBCC2407F; Fri, 31 Jan 2020 23:16:43 +0100 (CET)
Date: Fri, 31 Jan 2020 23:16:43 +0100
From: Andreas Henriksson &lt;andreas@fatal.se&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: zookeeperd: missing-systemd-service-for-init.d-script
Message-ID: &lt;158050881684.18390.12369728221232003122.reportbug@mbpah&gt;
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=&quot;clqibx2e2xuufrfv&quot;
Content-Disposition: inline
X-Mailer: reportbug 7.5.3~deb10u1
User-Agent: NeoMutt/20170113 (1.7.2)
Delivered-To: submit@bugs.debian.org


--clqibx2e2xuufrfv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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

--clqibx2e2xuufrfv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=&quot;zookeeper.service&quot;

[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

--clqibx2e2xuufrfv--
]