pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/fetchmail Add a rc.d script to easily start fetch...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fac14e1f4cac
branches:  trunk
changeset: 461162:fac14e1f4cac
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Sep 11 22:58:05 2003 +0000

description:
Add a rc.d script to easily start fetchmail as a daemon at startup.

diffstat:

 mail/fetchmail/Makefile           |   6 ++++--
 mail/fetchmail/PLIST              |   3 ++-
 mail/fetchmail/files/fetchmail.sh |  26 ++++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 3 deletions(-)

diffs (68 lines):

diff -r 93e81202be6d -r fac14e1f4cac mail/fetchmail/Makefile
--- a/mail/fetchmail/Makefile   Thu Sep 11 22:39:50 2003 +0000
+++ b/mail/fetchmail/Makefile   Thu Sep 11 22:58:05 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.131 2003/09/02 12:27:46 frueauf Exp $
+# $NetBSD: Makefile,v 1.132 2003/09/11 22:58:05 jlam Exp $
 
 DISTNAME=      fetchmail-6.2.4
 CATEGORIES=    mail
@@ -12,6 +12,7 @@
 BUILD_USES_MSGFMT=     YES
 
 USE_BUILDLINK2=                YES
+USE_PKGINSTALL=                YES
 USE_PKGLOCALEDIR=      YES
 GNU_CONFIGURE=         YES
 CONFIGURE_ARGS+=       --without-hesiod
@@ -48,7 +49,8 @@
 CONFIGURE_ARGS+=       --enable-inet6
 .endif
 
-FDOC=  ${PREFIX}/share/doc/fetchmail
+FDOC=          ${PREFIX}/share/doc/fetchmail
+RCD_SCRIPTS=   fetchmail
 
 post-extract:
        @${RM} -f ${WRKSRC}/intl/libintl.h
diff -r 93e81202be6d -r fac14e1f4cac mail/fetchmail/PLIST
--- a/mail/fetchmail/PLIST      Thu Sep 11 22:39:50 2003 +0000
+++ b/mail/fetchmail/PLIST      Thu Sep 11 22:58:05 2003 +0000
@@ -1,5 +1,6 @@
-@comment $NetBSD: PLIST,v 1.6 2003/07/20 14:52:45 frueauf Exp $
+@comment $NetBSD: PLIST,v 1.7 2003/09/11 22:58:05 jlam Exp $
 bin/fetchmail
+etc/rc.d/fetchmail
 man/man1/fetchmail.1
 share/doc/fetchmail/README
 share/doc/fetchmail/COPYING
diff -r 93e81202be6d -r fac14e1f4cac mail/fetchmail/files/fetchmail.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/fetchmail/files/fetchmail.sh Thu Sep 11 22:58:05 2003 +0000
@@ -0,0 +1,26 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: fetchmail.sh,v 1.1 2003/09/11 22:58:06 jlam Exp $
+#
+# PROVIDE: fetchmail
+# REQUIRE: DAEMON
+
+if [ -f /etc/rc.subr ]; then
+       . /etc/rc.subr
+fi
+
+name="fetchmail"
+rcvar=$name
+command="@PREFIX@/bin/${name}"
+pidfile="/var/run/${name}.pid"
+required_files="@PKG_SYSCONFDIR@/${name}.conf"
+extra_commands="reload"
+command_args="-f - < @PKG_SYSCONFDIR@/${name}.conf"
+
+if [ -f /etc/rc.subr ]; then
+       load_rc_config $name
+       run_rc_command "$1"
+else
+       @ECHO@ -n ' ${name}'
+       ${command} ${fetchmail_flags} ${command_args}
+fi



Home | Main Index | Thread Index | Old Index