]> git.pld-linux.org Git - packages/PolicyKit.git/blame - PolicyKit.init
- typo
[packages/PolicyKit.git] / PolicyKit.init
CommitLineData
28929ab1
PZ
1#!/bin/sh
2#
3# haldaemon HAL daemon
4#
5# chkconfig: 345 95 05
6#
7# description: This is a daemon for collecting and maintaing information \
8# about hardware from several sources. \
9# See http://www.freedesktop.org/software/hal
10#
11
12
13# Source function library
14. /etc/rc.d/init.d/functions
15
16start() {
17 # First step: check for running messagebus service
18 if [ -f /var/lock/subsys/messagebus ]; then
19 # Check if the service is already running?
20 if [ ! -f /var/lock/subsys/PolicyKit ]; then
21 msg_starting PolicyKit
22 daemon polkitd
23 RETVAL=$?
24 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/PolicyKit
25 else
26 msg_already_running PolicyKit
27 fi
28 else
29 msg_not_running messagebus
30 fi
31}
32
33stop() {
34 if [ -f /var/lock/subsys/PolicyKit ]; then
35 # Stop daemons.
36 msg_stopping PolicyKit
37 killproc polkitd
38 rm -f /var/lock/subsys/PolicyKit
39 else
40 msg_not_running PolicyKit
41 fi
42}
43
44# See how we were called.
45case "$1" in
46 start)
47 start
48 ;;
49 stop)
50 stop
51 ;;
52 restart)
53 stop
54 start
55 ;;
56 reload|force-reload)
57 if [ -f /var/lock/subsys/PolicyKit ]; then
58 msg_reloading PolicyKit
59 killproc polkitd -HUP
60 RETVAL=$?
61 else
62 msg_not_running PolicyKit
63 RETVAL=7
64 fi
65 ;;
66 status)
67 status polkitd
68 RETVAL=$?
69 ;;
70 *)
71 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
72 exit 3
73esac
74
75exit $RETVAL
76
77# This must be last line !
78# vi:syntax=sh
This page took 0.067518 seconds and 4 git commands to generate.