pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils/daemontools-run
Module Name: pkgsrc
Committed By: schmonz
Date: Thu Jul 27 04:05:16 UTC 2017
Added Files:
pkgsrc/sysutils/daemontools-run: DESCR Makefile PLIST
pkgsrc/sysutils/daemontools-run/files: README.pkgsrc svscan.sh
Log Message:
Initial import of daemontools-run, a package providing a NetBSD-style
rc.d script to start svscan.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/daemontools-run/DESCR \
pkgsrc/sysutils/daemontools-run/Makefile \
pkgsrc/sysutils/daemontools-run/PLIST
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/daemontools-run/files/README.pkgsrc \
pkgsrc/sysutils/daemontools-run/files/svscan.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/sysutils/daemontools-run/DESCR
diff -u /dev/null pkgsrc/sysutils/daemontools-run/DESCR:1.1
--- /dev/null Thu Jul 27 04:05:16 2017
+++ pkgsrc/sysutils/daemontools-run/DESCR Thu Jul 27 04:05:16 2017
@@ -0,0 +1 @@
+This package provides a NetBSD-style rc.d script to start svscan.
Index: pkgsrc/sysutils/daemontools-run/Makefile
diff -u /dev/null pkgsrc/sysutils/daemontools-run/Makefile:1.1
--- /dev/null Thu Jul 27 04:05:16 2017
+++ pkgsrc/sysutils/daemontools-run/Makefile Thu Jul 27 04:05:16 2017
@@ -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"
Index: pkgsrc/sysutils/daemontools-run/PLIST
diff -u /dev/null pkgsrc/sysutils/daemontools-run/PLIST:1.1
--- /dev/null Thu Jul 27 04:05:16 2017
+++ pkgsrc/sysutils/daemontools-run/PLIST Thu Jul 27 04:05:16 2017
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2017/07/27 04:05:16 schmonz Exp $
+share/doc/daemontools-run/README.pkgsrc
Index: pkgsrc/sysutils/daemontools-run/files/README.pkgsrc
diff -u /dev/null pkgsrc/sysutils/daemontools-run/files/README.pkgsrc:1.1
--- /dev/null Thu Jul 27 04:05:16 2017
+++ pkgsrc/sysutils/daemontools-run/files/README.pkgsrc Thu Jul 27 04:05:16 2017
@@ -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.
Index: pkgsrc/sysutils/daemontools-run/files/svscan.sh
diff -u /dev/null pkgsrc/sysutils/daemontools-run/files/svscan.sh:1.1
--- /dev/null Thu Jul 27 04:05:16 2017
+++ pkgsrc/sysutils/daemontools-run/files/svscan.sh Thu Jul 27 04:05:16 2017
@@ -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