File: fglrx-atieventsd.fglrx-atieventsd.init

package info (click to toggle)
fglrx-driver 1:15.9-4~deb8u1~bpo70+1
  • links: PTS, VCS
  • area: non-free
  • in suites: wheezy-backports
  • size: 505,568 kB
  • sloc: ansic: 15,231; xml: 4,141; sh: 2,401; makefile: 425
file content (79 lines) | stat: -rw-r--r-- 2,061 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/sh

#
# init.d-style example script for controlling the ATI External Events Daemon
#
# Distro maintainers may modify this reference script as necessary to conform
# to their distribution policies, or they may simply substitute their own script
# instead.  This reference script is provided merely as a simple example.
#
# Copyright (c) 2006, ATI Technologies Inc.  All rights reserved.
#

### BEGIN INIT INFO
# Provides:		fglrx-atieventsd
# Required-Start:	$syslog $remote_fs
# Required-Stop:	$syslog $remote_fs
# X-Start-Before:   $x-display-manager
# Should-Start:		$local_fs
# Should-Stop:		$local_fs
# Default-Start:	2 3 4 5
# Default-Stop:		0 1 6
# Short-Description:	control ATI external events daemon
# Description:		Starts or stops the ATI external events daemon,
#			which handles power management for fglrx-driver.
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

DAEMONPATH=/usr/sbin/atieventsd
DAEMONNAME=atieventsd
DAEMONOPTS=""
DESC="AMD events daemon"

# Check for default file of atieventsd.
if [ -f /etc/default/fglrx-atieventsd ] ; then
	. /etc/default/fglrx-atieventsd
else
	echo "Could not read file /etc/default/fglrx-atieventsd"
	exit 1
fi

[ -f $DAEMONPATH ] || exit 0

. /lib/lsb/init-functions

case "$1" in
    start)
		if [ "$START_ATIEVENTSD" != "true" ] ; then
			log_warning_msg "Not starting atieventsd, it is disabled in /etc/default/fglrx-atieventsd"
			exit 0
		fi
        log_daemon_msg "Starting $DESC" "$DAEMONNAME"
        start-stop-daemon --quiet --start --name $DAEMONNAME --exec $DAEMONPATH --oknodo -- $DAEMONOPTS
	log_end_msg $?
        ;;

    stop)
        log_daemon_msg "Stopping $DESC" "$DAEMONNAME"
        start-stop-daemon --quiet --stop --name $DAEMONNAME --exec $DAEMONPATH --oknodo
	log_end_msg $?
        ;;

    restart|force-reload)
        $0 stop
        sleep 1
        $0 start
        ;;

    status)
        status_of_proc $DAEMONPATH atieventsd && exit 0 || exit $?
        ;;

    *)
        echo "$0 {start|stop|restart|force-reload|status}"
        exit 3
        ;;
esac

exit 0