#! /bin/sh ### BEGIN INIT INFO # Provides: skeleton # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: Example initscript # Description: This file should be used to construct scripts to be # placed in /etc/init.d. ### END INIT INFO # Author: Foo Bar . # # Please remove the "Author" lines above and replace them # with your own name if you copy and modify this script. # Do NOT "set -e" # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/usr/sbin:/usr/bin:/sbin:/bin DESC="Biometric Service Provider" NAME=bsp SCRIPTNAME=/etc/init.d/$NAME # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME case "$1" in start) echo -n "Starting $DESC: $NAME" # chgrp adm /var/log/BSP.log # chmod g+rw /var/log/BSP.log DEVICE=`lsusb | sed -ne "/0483:2016/s/Bus\ \(.*\)\ Device\ \(.*\):\ .*/\1\/\2/p"` chgrp bsp "/proc/bus/usb/$DEVICE" chmod g+rw "/proc/bus/usb/$DEVICE" chgrp bsp "/dev/bus/usb/$DEVICE" chmod g+rw "/dev/bus/usb/$DEVICE" case "$?" in 0|1) echo "" ;; 2) echo " fail!" ;; esac ;; stop) ;; #reload|force-reload) # # If do_reload() is not implemented then leave this commented out # and leave 'force-reload' as an alias for 'restart'. # #log_daemon_msg "Reloading $DESC" "$NAME" #do_reload #log_end_msg $? #;; restart|force-reload) . start ;; *) #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 3 ;; esac :