Package: redis-server
Version: 2:2.8.8-1
Severity: normal
Tags: patch
User: pkg-systemd-maintain...@lists.alioth.debian.org
Usertags: systemd-units

This patch adds systemd support to redis-server.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.13-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages redis-server depends on:
ii  adduser       3.113+nmu3
ii  libc6         2.18-4
ii  libjemalloc1  3.5.1-2
ii  redis-tools   2:2.8.8-1

redis-server recommends no packages.

redis-server suggests no packages.

-- no debconf information
>From d8192989132fb5d6669338da4b338ac6f51d2ebb Mon Sep 17 00:00:00 2001
From: Wasif Malik <wma...@gmail.com>
Date: Fri, 4 Apr 2014 04:27:07 -0500
Subject: [PATCH 1/1] systemd support

---
 debian/control              |  2 +-
 debian/redis-server.install |  1 +
 debian/redis-server.service | 12 ++++++++++++
 debian/rules                |  2 +-
 4 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 debian/redis-server.service

diff --git a/debian/control b/debian/control
index d632371..54ea848 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: redis
 Section: database
 Priority: optional
 Maintainer: Chris Lamb <la...@debian.org>
-Build-Depends: debhelper (>= 7.0.50), libjemalloc-dev [linux-any]
+Build-Depends: debhelper (>= 7.0.50), libjemalloc-dev [linux-any], dh-systemd (>= 1.5)
 Standards-Version: 3.9.5
 Homepage: http://redis.io/
 Vcs-Git: git://github.com/lamby/pkg-redis.git
diff --git a/debian/redis-server.install b/debian/redis-server.install
index f35f5b8..0c2c043 100644
--- a/debian/redis-server.install
+++ b/debian/redis-server.install
@@ -1,3 +1,4 @@
 src/redis-server		/usr/bin
 debian/redis.conf	/etc/redis
 sentinel.conf	/etc/redis
+debian/redis-server.service /lib/systemd/system
diff --git a/debian/redis-server.service b/debian/redis-server.service
new file mode 100644
index 0000000..56e7518
--- /dev/null
+++ b/debian/redis-server.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Advanced key-value store
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
+ExecStop=/usr/bin/redis-cli shutdown
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/rules b/debian/rules
index 2d91d6d..92ac399 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,7 @@ export FORCE_LIBC_MALLOC = yes
 endif
 
 %:
-	dh $@
+	dh $@ --with systemd
 
 override_dh_auto_test:
 	# Testsuite requires working TCP/IP and a non-interactive mode
-- 
1.9.1

Reply via email to