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