pkgsrc-WIP-changes archive

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

siproxd: Add rc.d script



Module Name:	pkgsrc-wip
Committed By:	Hauke Fath <hauke%NetBSD.org@localhost>
Pushed By:	hauke
Date:		Tue Nov 6 20:27:42 2018 +0100
Changeset:	f242b4c4a0d5c0ed69f5831a01df52c635635119

Added Files:
	siproxd/files/siproxd

Log Message:
siproxd: Add rc.d script

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

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

diffstat:
 siproxd/files/siproxd | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diffs:
diff --git a/siproxd/files/siproxd b/siproxd/files/siproxd
new file mode 100755
index 0000000000..87916801b3
--- /dev/null
+++ b/siproxd/files/siproxd
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $NetBSD$
+#
+
+# PROVIDE: siproxd
+# REQUIRE: DAEMON
+# BEFORE:  LOGIN
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="siproxd"
+rcvar=$name
+command="/usr/pkg/sbin/${name}"
+pidfile="/var/run/${name}/${name}.pid"
+required_files="/etc/pkg/siproxd.conf"
+start_precmd="siproxd_precmd"
+
+siproxd_precmd()
+{
+        rc_flags="-p ${pidfile} $rc_flags"
+
+        local piddir="$(dirname "${pidfile}")"
+        mkdir -p "${piddir}"
+        chown siproxd:siproxd "${piddir}"
+}
+
+load_rc_config $name
+run_rc_command "$1"


Home | Main Index | Thread Index | Old Index