monitor backlight won't turn off, wrote a daemon to force it on / off

dave selby dave6502 at googlemail.com
Mon May 4 08:47:16 UTC 2009


So @reboot terminates the process after 30 mins, Soooo here is the
/etc/init.d 'backlight-daemon' file :) to start it conventionally
I linked it to rc2.d

Dave

#! /bin/sh

DESC="Backlight daemon"
DAEMON="/usr/local/bin/backlight_daemon.py"

test -x $DAEMON || exit 0

. /lib/lsb/init-functions

case "$1" in
  start)
        log_daemon_msg "Starting $DESC"
        nohup $DAEMON > /dev/null 2>&1 &
        log_end_msg $?
        ;;
  stop)
        log_daemon_msg "Stopping $DESC"
        pkill -f $DAEMON
        log_end_msg $?
        ;;

esac

exit 0




More information about the ubuntu-users mailing list