#!/sbin/runscript # Distributed under the terms of the GNU General Purpose License v2 # $Header: $ # Description: eTSrv This starts, stops, and reloads the eToken eTSrv NAME NAME=eTSrv name="eToken eTSrv NAME" command="/usr/bin/${NAME}" command_args="${EXTRA_OPTS}" pidfile="/var/run/${NAME}.pid" start_stop_NAME_args="-q -u pcscd:pcscd -n ${NAME}" start_stop_NAME_start_args="-k 000" start_stop_NAME_stop_args="-R TERM/2/KILL/5" depend() { need pcscd } checkconfig() { "${command}" --test > /dev/null || return 1 } start_pre() { if [ "${RC_CMD}" != "restart" ] ; then checkconfig || return 1 fi mkdir -p "/var/cache/eToken" } stop_pre() { if [ "${RC_CMD}" = "restart" ] ; then checkconfig || return 1 fi }