X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=breezed.git;a=blobdiff_plain;f=breezed.sh;h=f65c8101c01739e6f5f22295c5b7d6fa1aead298;hp=35e6067c4e821cfd5d975ee9be7679629b54bb62;hb=HEAD;hpb=29d922d3b115ae81e076e9fc03e5ea986fc42630 diff --git a/breezed.sh b/breezed.sh index 35e6067..f65c810 100755 --- a/breezed.sh +++ b/breezed.sh @@ -2,8 +2,8 @@ # breezed is a fan speed control daemon for Linux computers. # -# Copyright (c) 2008 Francois Fleuret -# Written by Francois Fleuret +# Copyright (c) 2008, 2009 Francois Fleuret +# Written by Francois Fleuret # # This file is part of breezed. # @@ -28,7 +28,8 @@ # Short-Description: Fan control daemon ### END INIT INFO -DAEMON="/usr/local/bin/breezed" +DAEMON="/usr/bin/breezed" +CONF_FILE="/etc/breezed.conf" test -x $DAEMON || exit 0 @@ -37,11 +38,15 @@ test -x $DAEMON || exit 0 case "$1" in start) - log_daemon_msg "Starting fan control daemon" "breezed" - start-stop-daemon --start --background --quiet \ - --make-pidfile --pidfile /var/run/breezed.pid \ - --exec ${DAEMON} - log_end_msg $? + if [[ -f "${CONF_FILE}" ]]; then + log_daemon_msg "Starting fan control daemon" "breezed" + start-stop-daemon --start --background --quiet \ + --make-pidfile --pidfile /var/run/breezed.pid \ + --exec ${DAEMON} + log_end_msg $? + else + log_failure_msg "Can not find ${CONF_FILE}." + fi ;; restart)