aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2014-03-28 15:51:16 +0100
committerMikhail Gusarov <dottedmag@dottedmag.net>2014-03-29 10:36:57 +0100
commit18c0d55ea780036564e1ae642c9af1d02995cb08 (patch)
tree974361fdfeab780de484565f2ec0942ca7c87cb3 /debian
parent16372c22a3c79e851e64be14f792d6867f2e2054 (diff)
downloadrspamd-18c0d55ea780036564e1ae642c9af1d02995cb08.tar.gz
rspamd-18c0d55ea780036564e1ae642c9af1d02995cb08.zip
Add systemd unit
Diffstat (limited to 'debian')
-rw-r--r--debian/control2
-rw-r--r--debian/logging.conf4
-rw-r--r--debian/rspamd.install2
-rwxr-xr-xdebian/rules5
-rw-r--r--debian/workers.conf19
5 files changed, 30 insertions, 2 deletions
diff --git a/debian/control b/debian/control
index e89f26946..f83005671 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: rspamd
Section: mail
Priority: optional
Maintainer: Mikhail Gusarov <dottedmag@debian.org>
-Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), cmake, libevent-dev (>= 1.3), libglib2.0-dev (>= 2.16.0), libgmime-2.6-dev, liblua5.2-dev | liblua5.1-dev | liblua5.1-0-dev, libpcre3-dev, libssl-dev (>= 1.0), libcurl4-openssl-dev, libhiredis-dev
+Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), cmake, libevent-dev (>= 1.3), libglib2.0-dev (>= 2.16.0), libgmime-2.6-dev, liblua5.2-dev | liblua5.1-dev | liblua5.1-0-dev, libpcre3-dev, libssl-dev (>= 1.0), libcurl4-openssl-dev, libhiredis-dev, dh-systemd
Standards-Version: 3.9.5
Homepage: https://rspamd.com
Vcs-Git: git://github.com/vstakhov/rspamd.git
diff --git a/debian/logging.conf b/debian/logging.conf
new file mode 100644
index 000000000..33234fde1
--- /dev/null
+++ b/debian/logging.conf
@@ -0,0 +1,4 @@
+logging {
+ type = "console";
+ level = "info";
+}
diff --git a/debian/rspamd.install b/debian/rspamd.install
new file mode 100644
index 000000000..f02b35d19
--- /dev/null
+++ b/debian/rspamd.install
@@ -0,0 +1,2 @@
+debian/workers.conf etc/rspamd
+debian/logging.conf etc/rspamd
diff --git a/debian/rules b/debian/rules
index be4ab6e11..fbb555cb3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
%:
- dh $@
+ dh $@ --with systemd
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# Until https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739834 is fixed
@@ -29,3 +29,6 @@ override_dh_auto_clean:
override_dh_fixperms:
dh_fixperms
chmod 750 $(CURDIR)/debian/rspamd/var/lib/rspamd
+
+override_dh_systemd_start:
+ dh_systemd_start --restart-after-upgrade
diff --git a/debian/workers.conf b/debian/workers.conf
new file mode 100644
index 000000000..1d59010da
--- /dev/null
+++ b/debian/workers.conf
@@ -0,0 +1,19 @@
+worker {
+ type = "normal";
+ bind_socket = "systemd:0";
+ http = false;
+ allow_learn = true;
+ mime = true;
+}
+worker {
+ type = "controller";
+ bind_socket = "systemd:1";
+ count = 1;
+}
+worker {
+ type = "webui";
+ count = 1;
+ bind_socket = "systemd:2";
+ password = "q1";
+ secure_ip = "127.0.0.1";
+}