1#! /bin/sh 2### BEGIN INIT INFO 3# Provides: sensord 4# Required-Start: $local_fs 5# Should-Start: 6# Required-Stop: $local_fs 7# Should-Stop: 8# Default-Start: 2 3 4 5 9# Default-Stop: 0 1 6 10# Short-Description: sensord initscript 11# Description: Starts the sensord logging daemon 12### END INIT INFO 13 14PATH=/sbin:/usr/sbin:/bin:/usr/bin 15 16DESC="sensors logging daemon" 17NAME="sensord" 18SENSORD=`which $NAME` 19 20. /etc/init.d/functions || exit 1 21. /etc/sensord.conf || exit 1 22 23# Exit if the package is not installed 24[ -x "$SENSORD" ] || exit 0 25 26case "$1" in 27 start) 28 echo -n "Starting $DESC: $NAME... " 29 start-stop-daemon -S -x $SENSORD -- $SENSORD_ARGS 30 echo "done." 31 ;; 32 stop) 33 echo -n "Stopping $DESC: $NAME... " 34 start-stop-daemon -K -x $SENSORD 35 echo "done." 36 ;; 37 restart) 38 echo "Restarting $DESC: $NAME... " 39 $0 stop 40 $0 start 41 echo "done." 42 ;; 43 *) 44 echo "Usage: $0 {start|stop|restart}" 45 exit 1 46 ;; 47esac 48 49exit 0 50