File: minid.initd

package info (click to toggle)
lsb 11.6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 236 kB
  • sloc: python: 1,162; sh: 143; perl: 6; makefile: 2
file content (52 lines) | stat: -rwxr-xr-x 1,033 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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