summaryrefslogtreecommitdiffstats
path: root/rspamd.service
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 /rspamd.service
parent16372c22a3c79e851e64be14f792d6867f2e2054 (diff)
downloadrspamd-18c0d55ea780036564e1ae642c9af1d02995cb08.tar.gz
rspamd-18c0d55ea780036564e1ae642c9af1d02995cb08.zip
Add systemd unit
Diffstat (limited to 'rspamd.service')
-rw-r--r--rspamd.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/rspamd.service b/rspamd.service
new file mode 100644
index 000000000..ff9655b93
--- /dev/null
+++ b/rspamd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=rapid spam filtering system
+
+[Service]
+Type=simple
+# Replace Pre/Post with RuntimeDirectory once it is available
+PermissionsStartOnly=true
+ExecStartPre=/bin/mkdir -m700 -p /run/rspamd
+ExecStartPre=/bin/chown _rspamd:_rspamd /run/rspamd
+ExecStart=/usr/bin/rspamd -f -c /etc/rspamd/rspamd.conf
+ExecReload=/bin/kill -HUP $MAINPID
+ExecStopPost=/bin/rm -r /run/rspamd
+WorkingDirectory=/var/lib/rspamd
+User=_rspamd