pkgsrc-WIP-changes archive

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

Add rcd script



Module Name:	pkgsrc-wip
Committed By:	Frédéric Fauberteau <frederic%fauberteau.org@localhost>
Pushed By:	frederic
Date:		Sun Dec 3 22:28:10 2017 +0100
Changeset:	eba4b256b8e8901a6ecf353460d891ba70828fff

Modified Files:
	taskd/Makefile
Added Files:
	taskd/files/taskd.sh

Log Message:
Add rcd script

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=eba4b256b8e8901a6ecf353460d891ba70828fff

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 taskd/Makefile       |  2 ++
 taskd/files/taskd.sh | 27 +++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diffs:
diff --git a/taskd/Makefile b/taskd/Makefile
index 4ee55e52d5..8937002d95 100644
--- a/taskd/Makefile
+++ b/taskd/Makefile
@@ -46,6 +46,8 @@ REPLACE_SH=	src/taskdctl
 MAKE_DIRS=+	${TASKD_DATA}
 OWN_DIRS_PERMS+=	${TASKD_DATA} ${TASKD_USER} ${TASKD_GROUP} 0750
 
+RCD_SCRIPTS=	taskd
+
 post-install:
 .for file in ${EGFILES}
 	${INSTALL_DATA} ${WRKSRC}/${file} ${DESTDIR}${EGDIR}/${file}
diff --git a/taskd/files/taskd.sh b/taskd/files/taskd.sh
new file mode 100644
index 0000000000..fd028eae65
--- /dev/null
+++ b/taskd/files/taskd.sh
@@ -0,0 +1,27 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: $
+#
+
+# PROVIDE: taskd
+# REQUIRE: NETWORKING FILESYSTEMS
+# BEFORE:  DAEMON
+
+. /etc/rc.subr
+
+name="taskd"
+rcvar="${name}"
+procname="@PREFIX@/bin/${name}"
+command="@PREFIX@/bin/${name}ctl"
+command_args="$1"
+extra_commands="reload"
+taskd_env="TASKDDATA=@TASKD_DATA@"
+taskd_user="@TASKD_USER@"
+
+if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then 
+  load_rc_config "${name}"
+elif [ -f @PKG_SYSCONFDIR@/rc.conf ]; then
+  . @PKG_SYSCONFDIR@/rc.conf
+fi
+
+run_rc_command "$1"


Home | Main Index | Thread Index | Old Index