# breezed is a fan speed control daemon for Linux computers.
#
-# Copyright (c) 2008 Francois Fleuret
+# Copyright (c) 2008, 2009 Francois Fleuret
# Written by Francois Fleuret <francois@fleuret.org>
#
# This file is part of breezed.
### END INIT INFO
DAEMON="/usr/local/bin/breezed"
+CONF_FILE="/etc/breezed.conf"
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)