#!/bin/sh ### BEGIN INIT INFO # Provides: tbpi_lcd # Required-Start: $local_fs $remote_fs $network $syslog $named $all # Required-Stop: $local_fs $remote_fs $network $syslog $named $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Dynamic message on LCD panel # Description: This will post a messge at bootup # onto an LCD panel. # ### END INIT INFO DAEMON=/usr/bin/dbus-daemon UUIDGEN=/usr/bin/dbus-uuidgen UUIDGEN_OPTS=--ensure NAME=tbpi # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions PATH=/sbin:/usr/sbin:/bin:/usr/bin . /lib/init/vars.sh /bin/sleep 2 do_start () { log_daemon_msg "Starting Sensiplicity LCD Services" "tbpi" #/usr/local/bin/tbpi_lcd.py start /opt/sensiplicity/bin/tbpi_lcd_i2c.py start /usr/bin/touch /var/run/tbpi.dynamic log_end_msg $? log_daemon_msg "Starting Sensiplicity Sensor Services" "tbpi" /opt/sensiplicity/bin/check_ebutton_state.py log_end_msg $? } do_stop () { log_daemon_msg "Starting Sensiplicity LCD Service" "tbpi" /opt/sensiplicity/bin/tbpi_lcd_i2c.py stop /bin/rm /var/run/tbpi.dynamic log_end_msg $? } do_status () { if [ -f /var/run/tbpi.dynamic ] ; then return 0 else return 4 fi } case "$1" in start|"") do_start ;; restart|reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) do_stop ;; status) do_status exit $? ;; *) echo "Usage: motd [start|stop|status]" >&2 exit 3 ;; esac :