Skip to content

Commit

Permalink
Unify systemd support
Browse files Browse the repository at this point in the history
- Move it from debian/ and centos/
- Ensure Debian package installs .service/.socket
- Enable socket-activated service
- Clean up redundant CentOS config files
  • Loading branch information
dottedmag authored and fatalbanana committed Mar 11, 2015
1 parent 2c7f4e1 commit 7fcaf66
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 178 deletions.
4 changes: 0 additions & 4 deletions centos/sources/logging.conf

This file was deleted.

11 changes: 0 additions & 11 deletions centos/sources/rspamd.service

This file was deleted.

1 change: 0 additions & 1 deletion centos/sources/tmpfiles.d

This file was deleted.

13 changes: 0 additions & 13 deletions centos/sources/workers.conf

This file was deleted.

Empty file modified debian/rspamd.init
100755 → 100644
Empty file.
2 changes: 0 additions & 2 deletions debian/rspamd.install

This file was deleted.

4 changes: 3 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ override_dh_auto_configure:
-DEXAMPLESDIR=/usr/share/doc/rspamd/examples \
-DLIBDIR=/usr/lib \
-DINCLUDEDIR=/usr/include \
-DSYSTEMDDIR=/lib/systemd/system \
-DNO_SHARED=ON \
-DDEBIAN_BUILD=1 \
-DINSTALL_EXAMPLES=ON \
-DFORCE_GMIME24=ON \
-DENABLE_HIREDIS=ON
-DENABLE_HIREDIS=ON \
-DWANT_SYSTEMD_UNITS=ON

override_dh_auto_clean:
dh_auto_clean
Expand Down
132 changes: 0 additions & 132 deletions linux/rspamd_debian.in

This file was deleted.

11 changes: 2 additions & 9 deletions rspamd.service
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
[Unit]
Description=rapid spam filtering system
After=nss-lookup.target

[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
ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f
User=_rspamd
7 changes: 2 additions & 5 deletions rspamd.socket
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ Description=rapid spam filtering system

[Socket]
ListenStream=11333
ListenStream=127.0.0.1:11334
ListenStream=127.0.0.1:11336
FreeBind=true
ListenStream=[::1]:11334

[Install]
WantedBy=sockets.target
BindIPv6Only=both

0 comments on commit 7fcaf66

Please sign in to comment.