#! /bin/sh

set -e

case "${1:-}" in
  configure|reconfigure)

    if [ ! -e /etc/brlapi.key ]; then
        mcookie >/etc/brlapi.key
        chmod 0640 /etc/brlapi.key
    fi

    [ -r /etc/default/brltty ] && . /etc/default/brltty

    ! [ "$START_IN_INITRAMFS" = "true" -o "$START_IN_INITRAMFS" = "yes" ] || \
	! command -v update-initramfs >/dev/null 2>&1 || update-initramfs -u

    #update-rc.d brltty start 10 23 . > /dev/null

    ;;
esac

#DEBHELPER#

