summaryrefslogtreecommitdiff
path: root/testscripts/dltdaemon
diff options
context:
space:
mode:
Diffstat (limited to 'testscripts/dltdaemon')
-rwxr-xr-xtestscripts/dltdaemon64
1 files changed, 64 insertions, 0 deletions
diff --git a/testscripts/dltdaemon b/testscripts/dltdaemon
new file mode 100755
index 0000000..baf3b8e
--- /dev/null
+++ b/testscripts/dltdaemon
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# Starts the DLT Daemon
+#
+# chkconfig: 2345 21 87
+# description: Provides DLT Debug Logging & Trace functionality
+# processname: dlt-daemon
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+
+processname=dlt-daemon
+processpath=/usr/bin
+servicename=dlt-daemon
+
+
+[ -x $processpath ] || exit 0
+
+start() {
+ echo -n $"Starting $processname daemon: "
+ /usr/bin/dlt-daemon -d
+}
+
+stop() {
+ echo -n $"Stopping $processname daemon: "
+ killproc $servicename -TERM
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$servicename
+}
+
+RETVAL=0
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/$servicename ]; then
+ stop
+ start
+ fi
+ ;;
+ reload)
+ restart
+ ;;
+ status)
+ status $processname
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
+ ;;
+esac
+
+exit $RETVAL