Package: nutcracker
Version: 0.4.0+dfsg-1
Severity: wishlist

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Dear Maintainer,

please see attached patch that adds a systemd unit file for nutcracker.

If you wish, I can commit it directly into collab git.

Greets,
  Jonas

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJVyR1PAAoJEPBM7/YBbP/QG8cQAJPkW/Wf/A7hXtj/pyZWbcZf
IJO5eFUMHFmC7KvbeoV+/elcvEYBaMiJsSIHHPQmiHmPCkcaOM4PNLtgRBv/rfvh
FRI367/cJavcZpaaQ38aLOxPGcj8mKSqnYcDB/qjuCy/HHlm3QREOp0njLSHQQth
BNijtL4Cs3le8LVAZ0QnacvrGV6vRe0WhaAI5i8P5l+rQvoGbnNJQVz68Byx2AFZ
JM3NI7TkmcpzVOmQnIe1gAmO0h8JSC6AQwbDDhLMkErjuOw91r9ZyonQ+0hcch4H
yTBTWTksF/LJ+HM4/CLi17IhjwF0rqwAraMMrq2MtMlqqm0DPSb9sC5QmeRfkK5I
P33XGoKrA6sVSTfnTTONuwu92j06eniqV5HA+64atqutHmsk/OjeUvWF5tbrsfam
AY3UqZCpN7LyVyA5MrhqXOXVMdNGe/sKS2Z3jNBhuKrPXJQoNgptMCo7VQBUx+Fk
lUzOgM8p9AcnMM7zHPX3FaFIUFpMaCtrylg3Bll14Rouwx16JRGtXrttAu1oruFM
fPXyRQ7lmk0Nd4obj86Qmptsh9b/stf+3vShWfdgdvHxVU4Fkp0SWogLL/rPAY72
0cpK66O+0CfM+EJ8GpSt9M4nvxyvFvUTT4nO3uxPYUDclT+9ThpcWyRofTtQt1yr
tJzAOY72jXVM3D3bpYsk
=yrHJ
-----END PGP SIGNATURE-----
>From 1157170fcba3dd21f6615e7070937188a29d41f4 Mon Sep 17 00:00:00 2001
From: Jonas Genannt <jo...@brachium-system.net>
Date: Mon, 10 Aug 2015 23:50:22 +0200
Subject: [PATCH] added systemd unit file

---
 debian/control            |  2 +-
 debian/nutcracker.service | 15 +++++++++++++++
 debian/rules              |  2 +-
 3 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 debian/nutcracker.service

diff --git a/debian/control b/debian/control
index 7a894c2..6dac617 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: nutcracker
 Section: net
 Priority: optional
 Maintainer: Faidon Liambotis <parav...@debian.org>
-Build-Depends: debhelper (>= 9), dh-autoreconf, libyaml-dev
+Build-Depends: debhelper (>= 9), dh-autoreconf, dh-systemd, libyaml-dev
 Standards-Version: 3.9.6
 Homepage: https://github.com/twitter/twemproxy
 Vcs-Git: git://anonscm.debian.org/collab-maint/nutcracker.git
diff --git a/debian/nutcracker.service b/debian/nutcracker.service
new file mode 100644
index 0000000..876f550
--- /dev/null
+++ b/debian/nutcracker.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=nutcracker - a Redis or/and Memcached proxy
+After=network.target syslog.socket
+
+[Service]
+EnvironmentFile=/etc/default/nutcracker
+RuntimeDirectory=nutcracker
+PIDFile=/var/run/nutcracker/nutcracker.pid
+User=nutcracker
+Group=nutcracker
+ExecStartPre=/usr/sbin/nutcracker $DAEMON_OPTS --test-conf
+ExecStart=/usr/sbin/nutcracker $DAEMON_OPTS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/rules b/debian/rules
index cce998b..481861a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,4 +4,4 @@
 #export DH_VERBOSE=1
 
 %:
-	dh $@  --with autoreconf
+	dh $@ --with autoreconf --with systemd
-- 
1.8.4.rc3

Reply via email to