pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/mrtg Add an rc.d script.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7e2a5f894154
branches:  trunk
changeset: 338477:7e2a5f894154
user:      jnemeth <jnemeth%pkgsrc.org@localhost>
date:      Mon Aug 26 06:41:08 2019 +0000

description:
Add an rc.d script.

diffstat:

 net/mrtg/Makefile      |   7 ++++---
 net/mrtg/files/mrtg.sh |  28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 3 deletions(-)

diffs (55 lines):

diff -r 8ca7ed10030e -r 7e2a5f894154 net/mrtg/Makefile
--- a/net/mrtg/Makefile Mon Aug 26 00:18:05 2019 +0000
+++ b/net/mrtg/Makefile Mon Aug 26 06:41:08 2019 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.129 2019/08/11 13:22:11 wiz Exp $
+# $NetBSD: Makefile,v 1.130 2019/08/26 06:41:08 jnemeth Exp $
 
 DISTNAME=      mrtg-2.17.7
-#PKGREVISION=  12
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    net
 MASTER_SITES=  https://oss.oetiker.ch/mrtg/pub/
 MASTER_SITES+= https://oss.oetiker.ch/mrtg/pub/old/
@@ -36,6 +35,8 @@
 
 INSTALLATION_DIRS+=    ${EGDIR} libexec
 
+RCD_SCRIPTS=           mrtg
+
 post-extract:
        cp ${FILESDIR}/mrtg.conf.example ${WRKDIR}
        cp ${FILESDIR}/netstat2mrtg ${WRKDIR}
diff -r 8ca7ed10030e -r 7e2a5f894154 net/mrtg/files/mrtg.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mrtg/files/mrtg.sh    Mon Aug 26 06:41:08 2019 +0000
@@ -0,0 +1,28 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: mrtg.sh,v 1.1 2019/08/26 06:41:08 jnemeth Exp $
+#
+# PROVIDE: mrtg
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# You will need to set some variables in /etc/rc.conf to start Asterisk:
+#
+# mrtg=YES
+
+if [ -f /etc/rc.subr ]
+then
+       . /etc/rc.subr
+fi
+
+name="mrtg"
+rcvar=$name
+command="@PREFIX@/bin/${name}"
+command_interpreter="@PERL5@"
+pidfile=@PKG_SYSCONFDIR@/${name}.pid
+required_files="@PKG_SYSCONFDIR@/mrtg.conf"
+extra_commands="reload"
+mrtg_flags="--daemon $required_files"
+
+load_rc_config $name
+run_rc_command "$1"



Home | Main Index | Thread Index | Old Index