[Lunar-commits] <moonbase> openslp: adding a init.d

Dennis 'stumbles' Veatch stumbles at lunar-linux.org
Tue May 5 19:07:45 CEST 2009


commit fef615bc62b2bc05fe02f738203a8baa79d303e7
Author: Dennis 'stumbles' Veatch <stumbles at lunar-linux.org>
Date:   Tue May 5 13:07:45 2009 -0400

    openslp: adding a init.d
---
 net/openslp/BUILD       |    7 ++++++
 net/openslp/init.d/slpd |   50 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/net/openslp/BUILD b/net/openslp/BUILD
new file mode 100644
index 0000000..f02ccb9
--- /dev/null
+++ b/net/openslp/BUILD
@@ -0,0 +1,7 @@
+(
+
+  OPTS="--enable-async-api --enable-slpv2-security"
+
+  default_build
+
+) > $C_FIFO 2>&1
diff --git a/net/openslp/init.d/slpd b/net/openslp/init.d/slpd
new file mode 100644
index 0000000..508fdc3
--- /dev/null
+++ b/net/openslp/init.d/slpd
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+#	/etc/init.d/slpd
+#
+# Starts the at daemon
+#
+# chkconfig: 345 40 60
+# description: OpenSLP daemon for the Service Location Protocol
+# processname: slpd
+
+# Source function library.
+. /lib/lsb/init-functions
+
+test -x /usr/sbin/slpd || exit 0
+
+RETVAL=0
+
+#
+#	See how we were called.
+#
+case "$1" in
+  start)
+	# Check if slpd is already running
+	if [ -f /var/lock/subsys/slpd ]; then
+            rm -f /var/lock/subsys/slpd
+	    echo -n 'Starting slpd: '
+	    /usr/sbin/slpd
+	    RETVAL=$?
+	    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/slpd
+	    echo
+	fi
+	;;
+  stop)
+	echo -n 'Stopping slpd: '
+	pkill -HUP slpd
+	RETVAL=$?
+	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/slpd
+	echo
+	;;
+  reload|restart)
+	$0 stop
+	$0 start
+	RETVAL=$?
+	;;
+  *)
+	echo "Usage: /etc/init.d/slpd {start|stop|restart|reload}"
+	exit 1
+esac
+
+exit $RETVAL


More information about the Lunar-commits mailing list