aboutsummaryrefslogtreecommitdiffstats
path: root/mail/sqlgrey
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2006-01-26 16:30:23 +0800
committerdougb <dougb@FreeBSD.org>2006-01-26 16:30:23 +0800
commit18e1d94e85d3740fe258a4135bd21dcc49f4d671 (patch)
treeca21db06fe2f8952587a01ef5c7715afed4fa291 /mail/sqlgrey
parent038522e558d45243c099561706003482c8dba9cc (diff)
downloadfreebsd-ports-gnome-18e1d94e85d3740fe258a4135bd21dcc49f4d671.tar.gz
freebsd-ports-gnome-18e1d94e85d3740fe258a4135bd21dcc49f4d671.tar.zst
freebsd-ports-gnome-18e1d94e85d3740fe258a4135bd21dcc49f4d671.zip
Unbreak by removing manual attempt to install rc.d script,
and a few other fixes. Pet portlint.
Diffstat (limited to 'mail/sqlgrey')
-rw-r--r--mail/sqlgrey/Makefile6
-rw-r--r--mail/sqlgrey/files/sqlgrey.sh.in19
2 files changed, 10 insertions, 15 deletions
diff --git a/mail/sqlgrey/Makefile b/mail/sqlgrey/Makefile
index d50afebe195d..b8f65fdf77d8 100644
--- a/mail/sqlgrey/Makefile
+++ b/mail/sqlgrey/Makefile
@@ -26,13 +26,10 @@ RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DB
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/SQLite.pm:${PORTSDIR}/databases/p5-DBD-SQLite
.endif
-BROKEN= Uses USE_RC_SUBR incorrectly; incorrect pkg-plist
-
USE_PERL5_RUN= yes
USE_RC_SUBR= sqlgrey.sh
USE_BZIP2= yes
NO_BUILD= yes
-USE_REINPLACE= yes
ETCFILES= clients_fqdn_whitelist clients_ip_whitelist dyn_fqdn.regexp smtp_server.regexp sqlgrey.conf
SGY_USERNAME?= sqlgrey
@@ -41,7 +38,7 @@ ETCDIR?= etc/sqlgrey
SUB_FILES= pkg-install
MY_SUB_LIST= ETCDIR=${ETCDIR} ETCFILES="${ETCFILES}" USER=${SGY_USERNAME} GROUP=${SGY_GROUPNAME} PERL=${PERL}
-SUB_LIST= ${MY_SUB_LIST}
+SUB_LIST+= ${MY_SUB_LIST}
PLIST_SUB= TOUCH=${TOUCH} ${MY_SUB_LIST}
PKGINSTALL= ${WRKDIR}/pkg-install
@@ -64,7 +61,6 @@ do-install:
@${INSTALL_SCRIPT} ${WRKSRC}/sqlgrey-logstats.pl ${PREFIX}/bin
@${INSTALL_SCRIPT} ${WRKSRC}/sqlgrey ${PREFIX}/sbin
@${INSTALL_SCRIPT} ${WRKSRC}/update_sqlgrey_config ${PREFIX}/sbin
- @${INSTALL_SCRIPT} ${WRKDIR}/sqlgrey.sh ${PREFIX}/etc/rc.d
@cd ${WRKSRC} && perldoc -u sqlgrey | pod2man sqlgrey > ${MANPREFIX}/man/man1/sqlgrey.1
@${MKDIR} ${PREFIX}/${ETCDIR}
.for i in ${ETCFILES}
diff --git a/mail/sqlgrey/files/sqlgrey.sh.in b/mail/sqlgrey/files/sqlgrey.sh.in
index 20b9a282ea3a..424a8248daf6 100644
--- a/mail/sqlgrey/files/sqlgrey.sh.in
+++ b/mail/sqlgrey/files/sqlgrey.sh.in
@@ -5,7 +5,7 @@
# PROVIDE: sqlgrey
# REQUIRE: LOGIN
# BEFORE: mail
-# KEYWORD: FreeBSD shutdown
+# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable sqlgrey:
@@ -18,24 +18,23 @@
. %%RC_SUBR%%
name=sqlgrey
-load_rc_config sqlgrey
+rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/sqlgrey
extra_commands=reload
command_interpreter=%%PERL%%
-stop_postcmd=stop_postcmd
+stop_postcmd=${name}_poststop
-stop_postcmd()
+sqlgrey_poststop()
{
- rm -f $pidfile
+ rm -f $pidfile
}
-# set defaults
+load_rc_config $name
-sqlgrey_enable=${sqlgrey_enable:-"NO"}
-sqlgrey_config=${sqlgrey_config:-"/usr/local/%%ETCDIR%%/sqlgrey.conf"}
-sqlgrey_flags=${sqlgrey_flags:-"--daemonize --configfile=${sqlgrey_config}"}
+sqlgrey_enable=${sqlgrey_enable-"NO"}
+sqlgrey_config=${sqlgrey_config-"/usr/local/%%ETCDIR%%/sqlgrey.conf"}
+sqlgrey_flags=${sqlgrey_flags-"--daemonize --configfile=${sqlgrey_config}"}
-load_rc_config $name
run_rc_command "$1"