]> git.pld-linux.org Git - packages/bluez.git/blame - pand.init
- required no longer
[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
24 msg_starting pand
25 daemon /usr/bin/pand ${PAND_OPTIONS}
26 RETVAL=$?
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
35 msg_stopping pand
36 killproc /usr/bin/pand
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
72 exit 0
73 else
74 exit 1
75 fi
76 ;;
77 *)
78 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
79 exit 3
80esac
81
82exit $RETVAL
This page took 0.038625 seconds and 4 git commands to generate.