pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/daemontools-run Initial import of daemontools...
details: https://anonhg.NetBSD.org/pkgsrc/rev/40e6c18486d8
branches: trunk
changeset: 365822:40e6c18486d8
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Thu Jul 27 04:05:16 2017 +0000
description:
Initial import of daemontools-run, a package providing a NetBSD-style
rc.d script to start svscan.
diffstat:
sysutils/daemontools-run/DESCR | 1 +
sysutils/daemontools-run/Makefile | 55 ++++++++++++++++++++++++++++
sysutils/daemontools-run/PLIST | 2 +
sysutils/daemontools-run/files/README.pkgsrc | 11 +++++
sysutils/daemontools-run/files/svscan.sh | 52 ++++++++++++++++++++++++++
5 files changed, 121 insertions(+), 0 deletions(-)
diffs (141 lines):
diff -r 843707bedd7b -r 40e6c18486d8 sysutils/daemontools-run/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/daemontools-run/DESCR Thu Jul 27 04:05:16 2017 +0000
@@ -0,0 +1,1 @@
+This package provides a NetBSD-style rc.d script to start svscan.
diff -r 843707bedd7b -r 40e6c18486d8 sysutils/daemontools-run/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/daemontools-run/Makefile Thu Jul 27 04:05:16 2017 +0000
@@ -0,0 +1,55 @@
+# $NetBSD: Makefile,v 1.1 2017/07/27 04:05:16 schmonz Exp $
+#
+
+DISTNAME= daemontools-run-20170727
+CATEGORIES= sysutils
+MASTER_SITES= # empty
+DISTFILES= # empty
+
+MAINTAINER= schmonz%NetBSD.org@localhost
+COMMENT= Configures daemontools to run supervised services
+LICENSE= 2-clause-bsd
+
+DEPENDS_DAEMONTOOLS= daemontools-[0-9]*:../../sysutils/daemontools
+DEPENDS+= ${DEPENDS_DAEMONTOOLS}
+
+WRKSRC= ${WRKDIR}
+NO_BUILD= yes
+NO_CHECKSUM= yes
+
+# XXX
+DAEMONTOOLS_LOG_USER?= multilog
+DAEMONTOOLS_GROUP?= svscan
+
+MAKE_DIRS+= ${VARBASE}/service
+PKG_GROUPS_VARS+= DAEMONTOOLS_GROUP
+PKG_USERS_VARS+= DAEMONTOOLS_LOG_USER
+PKG_GROUPS+= ${DAEMONTOOLS_GROUP}
+PKG_USERS+= ${DAEMONTOOLS_LOG_USER}:${DAEMONTOOLS_GROUP}
+RCD_SCRIPTS= svscan
+FILES_SUBST+= VARBASE=${VARBASE:Q}
+FILES_SUBST+= DAEMONTOOLS_LOG_USER=${DAEMONTOOLS_LOG_USER:Q}
+FILES_SUBST+= PKGNAME=${PKGNAME:Q}
+
+INSTALLATION_DIRS= share/doc/${PKGBASE}
+BUILD_DEFS+= VARBASE DAEMONTOOLS_LOG_USER # XXX_GROUP
+
+.include "../../mk/bsd.prefs.mk"
+
+# Detect the PKG_SYSCONFDIR of the installed daemontools, so we can create
+# config files there and refer to them from rc.d scripts.
+#
+.if !defined(PKG_SYSCONFDIR.daemontools-run)
+PKG_SYSCONFDIR.daemontools-run!= \
+ ${PKG_INFO} -Q PKG_SYSCONFDIR \
+ ${DEPENDS_DAEMONTOOLS:C/:.*$//:Q} 2>/dev/null || \
+ ${ECHO} "PKG_SYSCONFDIR.daemontools-run_not_set"
+. if empty(PKG_SYSCONFDIR.daemontools-run:M*not_set)
+MAKEVARS+= PKG_SYSCONFDIR.daemontools-run
+. endif
+.endif
+
+do-install:
+ ${INSTALL_DATA} ${FILESDIR}/README.pkgsrc ${DESTDIR}${PREFIX}/share/doc/daemontools-run
+
+.include "../../mk/bsd.pkg.mk"
diff -r 843707bedd7b -r 40e6c18486d8 sysutils/daemontools-run/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/daemontools-run/PLIST Thu Jul 27 04:05:16 2017 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2017/07/27 04:05:16 schmonz Exp $
+share/doc/daemontools-run/README.pkgsrc
diff -r 843707bedd7b -r 40e6c18486d8 sysutils/daemontools-run/files/README.pkgsrc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/daemontools-run/files/README.pkgsrc Thu Jul 27 04:05:16 2017 +0000
@@ -0,0 +1,11 @@
+ Getting help
+ ============
+
+You've installed an automated and customized daemontools-run package.
+If you're having trouble getting the daemontools daemons to run, ask
+the package's maintainer:
+
+<URL:mailto:schmonz-pkgsrc-daemontools%schmonz.com@localhost>
+
+If you need to ask for help on the log list, please mention that
+you're using the daemontools-run package from pkgsrc.
diff -r 843707bedd7b -r 40e6c18486d8 sysutils/daemontools-run/files/svscan.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/daemontools-run/files/svscan.sh Thu Jul 27 04:05:16 2017 +0000
@@ -0,0 +1,52 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: svscan.sh,v 1.1 2017/07/27 04:05:16 schmonz Exp $
+#
+# @PKGNAME@ script to control svscan (service supervisor).
+#
+
+# PROVIDE: svscan
+# REQUIRE: NETWORKING mountcritremote syslogd
+# BEFORE: DAEMON
+
+name="svscan"
+
+# User-settable rc.conf variables and their default values:
+: ${svscan_postenv:="PATH=$PATH"}
+: ${svscan_datalimit:="3000000"}
+: ${svscan_servicedir:="@VARBASE@/service"}
+: ${svscan_log:="YES"}
+: ${svscan_logcmd:="logger -t nb${name} -p daemon.info"}
+: ${svscan_nologcmd:="@PREFIX@/bin/multilog -*"}
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+rcvar=${name}
+required_dirs="${svscan_servicedir}"
+command="@PREFIX@/bin/${name}"
+start_precmd="svscan_precmd"
+
+svscan_precmd()
+{
+ if [ -f /etc/rc.subr ] && ! checkyesno svscan_log; then
+ svscan_logcmd=${svscan_nologcmd}
+ fi
+ command="exec </dev/null >/dev/null 2>/dev/null
+@PREFIX@/bin/pgrphack @SETENV@ - ${svscan_postenv}
+@PREFIX@/bin/${name} ${svscan_servicedir}
+2>&1 |
+@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @DAEMONTOOLS_LOG_USER@ ${svscan_logcmd}"
+ command_args="&"
+ rc_flags=""
+}
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO_N@ " ${name}"
+ svscan_precmd
+ eval ${command} ${svscan_flags} ${command_args}
+fi
Home |
Main Index |
Thread Index |
Old Index