#!/bin/sh
#
# /etc/rc.d/i8k: start/stop/restart i8kbuttons and i8kmon daemons
#

case "$1" in
	"start")
		/usr/bin/i8kmon -d -a -t 5 &
		/usr/bin/i8kbuttons -u "/usr/bin/aumix -v +10" -d "/usr/bin/aumix -v -10" -m "/usr/bin/aumix -v 0" &
		;;
	"stop")
		killall -q i8kbuttons
		kill `ps ax | grep "tclsh /usr/bin/i8kmon" | grep -v grep | tr -s " " | cut -d " " -f 2`
		;;
	"restart")
		$0 stop
		$0 start
		;;
	*)
		echo "USAGE: $0 {start|stop}"
		;;
esac

# End of file
