Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
699 B

#!/bin/sh
PIDDIR=/var/run/pcscd
PIDFILE=$PIDDIR/pcscd.pid
case "$1" in
start)
if [ ! -d $PIDDIR ]; then
mkdir -p $PIDDIR
chown scard:scard $PIDDIR
fi
su scard -c "/usr/sbin/pcscd"
;;
restart)
$0 stop
sleep 1
$0 start
;;
stop)
if [ -f $PIDFILE ] && kill -0 $(head -n 1 $PIDFILE) ; then
kill -TERM $(head -n 1 $PIDFILE)
fi
;;
status)
if [ -f $PIDFILE ] && kill -0 $(head -n 1 $PIDFILE) ; then
echo "pcscd is running."
else
echo "pcscd is not running."
fi
;;
reload)
/usr/sbin/pcscd --hotplug
;;
*)
echo "usage: $0 {start|stop|restart|status|reload}"
exit 1
;;
esac
exit 0