Created
November 16, 2011 16:44
-
-
Save liferealized/1370598 to your computer and use it in GitHub Desktop.
Start up script for debian system that uses atitweak to set gpu fan speeds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Patrick "p2k" Schneider <me@p2k-network.org> | |
# Donate: 166rK7eEVgnGvs9aA7jvu8NoPv8KzbPQ3L | |
# Install rcX.d scripts: update-rc.d atitweak defaults | |
# Uninstall: update-rc.d -f atitweak remove | |
### BEGIN INIT INFO | |
# Provides: atitweak | |
# Should-Start: console-screen hal | |
# Required-Start: $local_fs $remote_fs x11-common gdm | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Tweaks ATI cards. | |
# Description: Like I said, tweaks ATI cards. | |
### END INIT INFO | |
if test -f /etc/default/atitweak; then | |
. /etc/default/atitweak | |
fi | |
. /lib/lsb/init-functions | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin::/usr/local/sbin:/usr/local/bin | |
case "$1" in | |
start|restart|reload|force-reload) | |
log_daemon_msg "Tweaking ATI cards" "atitweak" | |
if test $NUM_ADAPTERS -eq 0; then | |
atitweak $ATITWEAK_OPTIONS >/dev/null | |
log_end_msg $? | |
else | |
for (( i=0; i<NUM_ADAPTERS; i++ )); do | |
atitweak -A $i $ATITWEAK_OPTIONS >/dev/null | |
done | |
log_end_msg 0 | |
fi | |
;; | |
stop) | |
# No-op | |
;; | |
*) | |
log_action_msg "Usage: $0 {start|stop|restart|reload|force-reload|status}" | |
exit 1 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment