#!/bin/bash

# Script to notify kino of a jogshuttle event.

# This script will run when a jogshuttle device is inserted into the
# usb bus. Kino is then sent a signal (SIGUSR2).

# Uncomment this for debug.
#if [ -x /usr/bin/logger ]; then
#    /usr/bin/logger -t $0 "was run"
#fi

if [ "${ACTION}" = "add" ]; then
    killall --quiet -USR2 kino
# Also debug
#    if [ -f "${DEVICE}" ]; then
#	if [ -x /usr/bin/logger ]; then
#	    /usr/bin/logger -t $0 "${DEVICE} was added"
#	fi
#    fi
fi
