]> git.pld-linux.org Git - packages/xorg-driver-video-fglrx.git/blame - atieventsd.init
- xorg-driver-video virtual for video drivers
[packages/xorg-driver-video-fglrx.git] / atieventsd.init
CommitLineData
e601548e
JR
1#!/bin/sh
2#
3# atieventsd ATI External Events Daemon
4#
5# chkconfig: 345 50 50
6#
7# description: ATI External Events Daemon
8#
9# processname: atieventsd
10# config:
11# pidfile: /var/run/atieventsd.pid
12
13# Source function library
14. /etc/rc.d/init.d/functions
15
e601548e
JR
16DAEMONOPTS=""
17DAEMONXAUTHFILE=/var/run/$DAEMONNAME.Xauthority
18
beef4355
JR
19# Get service config - may override defaults
20[ -f /etc/sysconfig/atieventsd ] && . /etc/sysconfig/atieventsd
21
e601548e
JR
22start() {
23 # Check if the service is already running?
24 if [ -f /var/lock/subsys/atieventsd ]; then
25 msg_already_running "atieventsd"
26 return
27 fi
28
29 msg_starting "atieventsd"
30 XAUTHORITY=$DAEMONXAUTHFILE daemon /usr/sbin/atieventsd $DAEMONOPTS
31 pidofproc atieventsd > /var/run/atieventsd.pid
32 RETVAL=$?
33 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/atieventsd
34}
35
36stop() {
37 if [ ! -f /var/lock/subsys/atieventsd ]; then
38 msg_not_running "atieventsd"
39 return
40 fi
41
42 # Stop daemons.
43 msg_stopping "atieventsd"
44 killproc --pidfile /var/run/atieventsd.pid atieventsd
45 rm -f /var/lock/subsys/atieventsd
46}
47
48condrestart() {
49 if [ ! -f /var/lock/subsys/atieventsd ]; then
50 msg_not_running "atieventsd"
51 RETVAL=$1
52 return
53 fi
54
55 stop
56 start
57}
58
59RETVAL=0
60# See how we were called.
61case "$1" in
62 start)
63 start
64 ;;
65 stop)
66 stop
67 ;;
68 restart)
69 stop
70 start
71 ;;
72 try-restart)
73 condrestart 0
74 ;;
75 force-reload)
76 condrestart 7
77 ;;
78 status)
79 status atieventsd
80 RETVAL=$?
81 ;;
82 *)
83 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
84 exit 3
85esac
86
87exit $RETVAL
This page took 0.07155 seconds and 4 git commands to generate.