]> git.pld-linux.org Git - packages/bluez.git/blob - dund.init
- updated to 4.95
[packages/bluez.git] / dund.init
1 #!/bin/sh
2 #
3 # dund  Bluetooth Dial-Up-Networking Daemon
4 #
5 # chkconfig:    345 26 89
6 #
7 # description:  Bluetooth Dial-Up-Networking Daemon. Provides PPP over RFCOMM services.
8 #
9 # $Id$
10
11
12 # Source function library
13 . /etc/rc.d/init.d/functions
14
15 [ -f /etc/sysconfig/bluetooth ] && . /etc/sysconfig/bluetooth
16
17 is_no "${NETWORKING}" && exit 0
18
19 start() {
20         # Check if the service is already running?
21         if [ ! -f /var/lock/subsys/dund ]; then
22                 msg_starting dund
23                 daemon /usr/bin/dund ${DUND_OPTIONS}
24                 RETVAL=$?
25                 touch /var/lock/subsys/dund
26         else
27                 msg_already_running dund
28         fi
29 }
30
31 stop() {
32         if [ -f /var/lock/subsys/dund ]; then
33                 msg_stopping dund
34                 killproc /usr/bin/dund
35                 rm -f /var/lock/subsys/dund
36         else
37                 msg_not_running dund
38         fi
39 }
40
41 condrestart() {
42         if [ -f /var/lock/subsys/dund ]; then
43                 stop
44                 start
45         else
46                 msg_not_running dund
47                 RETVAL=$1
48         fi
49 }
50
51 RETVAL=0
52 # See how we were called.
53 case "$1" in
54   start)
55         start
56         ;;
57   stop)
58         stop
59         ;;
60   restart|reload|force-reload)
61         stop
62         start
63         ;;
64   try-restart)
65         condrestart 0
66         ;;
67   status)
68         if [ -f /var/lock/subsys/dund ]; then
69                 nls "dund is running"
70                 exit 0
71         else
72                 msg_not_running dund
73                 exit 3
74         fi
75         ;;
76   *)
77         msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
78         exit 3
79 esac
80
81 exit $RETVAL
This page took 0.04268 seconds and 3 git commands to generate.