1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00

Add sample rc.d/spamd.sh script

This commit is contained in:
Andrey A. Chernov 2002-02-26 11:21:22 +00:00
parent cc25af394c
commit e409bf320b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=55263
2 changed files with 26 additions and 2 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= Mail-SpamAssassin
PORTVERSION= 2.01
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= mail perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Mail
@ -30,8 +30,12 @@ MAN1= spamd.1 spamassassin.1 spamc.1
post-patch:
@find ${WRKSRC} -type f -name "*.orig" -exec rm -f "{}" ";"
.if !defined(NOPORTDOCS)
post-install:
strip ${PREFIX}/bin/spamc
cd ${FILESDIR}; \
${INSTALL_DATA} spamd.sh \
${PREFIX}/etc/rc.d/spamd.sh-dist
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/sample-nonspam.txt ${DOCSDIR}

View File

@ -0,0 +1,20 @@
#!/bin/sh
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 1
fi
case "$1" in
start)
[ -x ${PREFIX}/bin/spamd ] && ${PREFIX}/bin/spamd -a -c -d && echo -n ' spamd'
;;
stop)
killall spamd && echo -n ' spamd'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
exit 0