diff options
author | Chris Lawrence <lawrencc@debian.org> | 2008-08-01 16:39:43 -0500 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2008-08-01 16:39:43 -0500 |
commit | 082902462e5bd2170d5c6e2f00f824a67a2c1c63 (patch) | |
tree | 732f1a0bf026bffe7894731378fc89c95e41e1fa /test | |
parent | 4e3f929c9917bcd5a2e85b885181032f142038ee (diff) |
lsb 3.2-16 Debian release.
Diffstat (limited to 'test')
-rw-r--r-- | test | 2 | ||||
-rwxr-xr-x | test/minid.initd | 52 | ||||
-rwxr-xr-x | test/minid.pl | 8 |
3 files changed, 60 insertions, 2 deletions
@@ -1,2 +0,0 @@ -. init-functions -start_daemon -p /var/run/dirmngr.pid /usr/bin/dirmngr --daemon --sh diff --git a/test/minid.initd b/test/minid.initd new file mode 100755 index 0000000..2302015 --- /dev/null +++ b/test/minid.initd @@ -0,0 +1,52 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: svnd +# Required-Start: $syslog $remote_fs +# Should-Start: $time ypbind sendmail +# Required-Stop: $syslog $remote_fs +# Should-Stop: $time ypbind sendmail +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: The daemon +# Description: a cool daemon +### END INIT INFO +# chkconfig: 345 99 00 +# description: a cool daemon + + +DAEMON="/tmp/minid.pl" + +PARA=" " +. /lib/lsb/init-functions + +case "$1" in + start) + echo -n "Starting $DAEMON " + start_daemon $DAEMON $PARA + RETVAL=$? + ;; + stop) + echo -n "Shutting down $DAEMON " + killproc $DAEMON -TERM + RETVAL=$? + ;; + restart) + $0 stop + $0 start + ;; + status) + echo -n "Checking for service $DAEMON " + pidofproc $DAEMON 2>&1 >/dev/null + RETVAL=$? + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +if [ "x$RETVAL" = "x0" ] ; then + log_success_msg + else + log_failure_msg +fi diff --git a/test/minid.pl b/test/minid.pl new file mode 100755 index 0000000..9bc81f2 --- /dev/null +++ b/test/minid.pl @@ -0,0 +1,8 @@ +#!/usr/bin/perl -w +# detach from tty +main: +$pid = fork; +exit if $pid; +die "fork: $!" unless defined $pid; +print "continue in child"; +sleep(4000); |