File: dnet-progs.init.d

package info (click to toggle)
dnprogs 2.18-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,896 kB
  • ctags: 3,051
  • sloc: ansic: 18,586; cpp: 9,436; makefile: 669; sh: 502; awk: 13
file content (63 lines) | stat: -rw-r--r-- 1,272 bytes parent folder | download
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
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
#
# dnet-progs.sh 
#
# Starts/stops DECnet processes
#
# --------------------------------------------------------------------------
#
#
# Daemons to start are defined in /etc/default/dnet-progs
#

. /etc/default/decnet

case $1 in
   start)
     # Don't issue any messages if DECnet is not configured as
     # dnet-common will have taken care of those.
     if [ ! -f /etc/decnet.conf -o ! -f /proc/net/decnet ]
     then
       exit 1
     fi

     echo -n "Starting DECnet daemons:"

     for i in $DNET_DAEMONS
     do
       if [ -f /usr/sbin/$i ]
       then
         echo -n " $i"
         start-stop-daemon --start --quiet --exec /usr/sbin/$i         
       fi
     done
     echo "."
     ;;

   stop)
     echo -n "Stopping DECnet daemons:"
     for i in $DNET_DAEMONS
     do
       echo -n " $i"
       start-stop-daemon --stop --quiet --exec /usr/sbin/$i
     done
     echo "."
     ;;

   restart|force-reload)
     echo -n "Restarting DECnet daemons:"
     for i in $DNET_DAEMONS
     do
       echo -n " $i"
       start-stop-daemon --stop --quiet --exec /usr/sbin/$i
       start-stop-daemon --start --quiet --exec /usr/sbin/$i
     done
     echo "."
     ;;

   *)
     echo "Usage $0 {start|stop|restart|force-reload}"
     ;;
esac

exit 0