summaryrefslogtreecommitdiff
path: root/packages/pcsc-lite/files/pcscd.init
diff options
context:
space:
mode:
Diffstat (limited to 'packages/pcsc-lite/files/pcscd.init')
-rw-r--r--packages/pcsc-lite/files/pcscd.init32
1 files changed, 32 insertions, 0 deletions
diff --git a/packages/pcsc-lite/files/pcscd.init b/packages/pcsc-lite/files/pcscd.init
new file mode 100644
index 0000000000..92385ab196
--- /dev/null
+++ b/packages/pcsc-lite/files/pcscd.init
@@ -0,0 +1,32 @@
+#!/bin/sh
+DAEMON=/usr/sbin/pcscd
+NAME=pcscd
+DESC="PCSC Daemon"
+PIDFILE=/var/run/pcscd/pcscd.pid
+ARGS=""
+
+test -f $DAEMON || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: $NAME"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $ARGS
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
+ echo "."
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0