cvs commit: ports/mail/rspamd Makefile ports/mail/rspamd/files
rspamd.in
Doug Barton
dougb at FreeBSD.org
Sun May 6 06:22:34 UTC 2012
The attached patch fixes some problems with the 2 rc.d scripts for this
port:
1. Misc. style issues in both scripts
2. Neither script sets pidfile properly. The redirector script didn't
set pidfile= at all, which is a problem because that variable is magic
in rc.d.
hth,
Doug
On 05/05/2012 23:01, Andrej Zverev wrote:
> az 2012-05-06 06:01:12 UTC
>
> FreeBSD ports repository
>
> Modified files:
> mail/rspamd Makefile
> mail/rspamd/files rspamd.in
> Log:
> - rspamd needs group and user to be passed as args.
> Currently this not true for checkconfig which called by restart,
> reload, configtest.
> - bump PORTREVISION
>
> PR: ports/167220 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=167220
> Submitted by: az
> Approved by: maintainer (timeout)
>
> Revision Changes Path
> 1.22 +1 -1 ports/mail/rspamd/Makefile
> 1.5 +2 -2 ports/mail/rspamd/files/rspamd.in
>
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/mail/rspamd/Makefile.diff?&r1=1.21&r2=1.22&f=u
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/mail/rspamd/files/rspamd.in.diff?&r1=1.4&r2=1.5&f=u
>
--
This .signature sanitized for your protection
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/mail/rspamd/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- Makefile 6 May 2012 06:01:12 -0000 1.22
+++ Makefile 6 May 2012 06:19:43 -0000
@@ -7,7 +7,7 @@
PORTNAME= rspamd
PORTVERSION= 0.4.6
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail
MASTER_SITES= http://highsecure.ru/
Index: files/rspamd.in
===================================================================
RCS file: /home/pcvs/ports/mail/rspamd/files/rspamd.in,v
retrieving revision 1.5
diff -u -r1.5 rspamd.in
--- files/rspamd.in 6 May 2012 06:01:12 -0000 1.5
+++ files/rspamd.in 6 May 2012 06:19:43 -0000
@@ -1,5 +1,5 @@
#!/bin/sh
-#
+
# $FreeBSD: ports/mail/rspamd/files/rspamd.in,v 1.5 2012/05/06 06:01:12 az Exp $
#
# PROVIDE: rspamd
@@ -21,40 +21,37 @@
name=rspamd
rcvar=rspamd_enable
-command=%%PREFIX%%/bin/rspamd
-restart_precmd="rspamd_checkconfig"
-reload_precmd="rspamd_checkconfig"
-configtest_cmd="rspamd_checkconfig"
-reopenlog_cmd="reopenlog_cmd"
-
-pidfile="$rspamd_pidfile"
-required_files=%%PREFIX%%/etc/rspamd.xml
load_rc_config $name
-: ${rspamd_enable="NO"}
-: ${rspamd_pidfile="/var/run/rspamd/rspamd.pid"}
+: ${rspamd_enable:="NO"}
: ${rspamd_user="nobody"}
: ${rspamd_group="nobody"}
: ${rspamd_flags="-c %%PREFIX%%/etc/rspamd.xml"}
-stop_postcmd="rm -f $rspamd_pidfile"
+pidfile=${rspamd_pidfile:-"/var/run/rspamd/rspamd.pid"}
+
+command=%%PREFIX%%/bin/rspamd
+restart_precmd="rspamd_checkconfig"
+reload_precmd="rspamd_checkconfig"
+configtest_cmd="rspamd_checkconfig"
+reopenlog_cmd="reopenlog_cmd"
+
+required_files=%%PREFIX%%/etc/rspamd.xml
+command_args="-u ${rspamd_user} -g ${rspamd_group}"
+sig_reload="HUP"
+extra_commands="reload configtest reopenlog"
+stop_postcmd="rm -f $pidfile"
rspamd_checkconfig()
{
- echo "Performing sanity check on rspamd configuration:"
- eval ${command} ${command_args} -t
+ echo "Performing sanity check on rspamd configuration:"
+ eval ${command} ${command_args} -t
}
reopenlog_cmd()
{
- pkill -USR1 -F $rspamd_pidfile
+ pkill -USR1 -F $pidfile
}
-sig_reload="HUP"
-
-command_args="-u ${rspamd_user} -g ${rspamd_group}"
-
-extra_commands="reload configtest reopenlog"
run_rc_command "$1"
-
Index: files/rspamd_redirector.in
===================================================================
RCS file: /home/pcvs/ports/mail/rspamd/files/rspamd_redirector.in,v
retrieving revision 1.2
diff -u -r1.2 rspamd_redirector.in
--- files/rspamd_redirector.in 14 Jan 2012 08:56:03 -0000 1.2
+++ files/rspamd_redirector.in 6 May 2012 06:19:43 -0000
@@ -1,11 +1,10 @@
#!/bin/sh
-#
+
# $FreeBSD: ports/mail/rspamd/files/rspamd_redirector.in,v 1.2 2012/01/14 08:56:03 dougb Exp $
#
# PROVIDE: rspamd_redirector
# REQUIRE: LOGIN
# KEYWORD: shutdown
-
#
# Add the following line to /etc/rc.conf to enable rspamd_redirector:
#
@@ -16,18 +15,17 @@
name="rspamd_redirector"
rcvar=rspamd_redirector_enable
-command="%%PREFIX%%/bin/rspamd-redirector"
load_rc_config $name
-: ${rspamd_redirector_enable="NO"}
-: ${rspamd_redirector_pidfile="/var/run/rspamd/redirector.pid"}
+: ${rspamd_redirector_enable:="NO"}
-stop_postcmd="rm -f $rspamd_redirector_pidfile"
+pidfile=${rspamd_redirector_pidfile:-"/var/run/rspamd/redirector.pid"}
+command="%%PREFIX%%/bin/rspamd-redirector"
+command_interpreter="/usr/bin/perl"
extra_commands="reload"
sig_reload="USR1"
-
-command_interpreter="/usr/bin/perl"
+stop_postcmd="rm -f $pidfile"
run_rc_command "$1"
More information about the cvs-ports
mailing list