]> git.pld-linux.org Git - packages/openct.git/blame - openct.init
- release 2
[packages/openct.git] / openct.init
CommitLineData
33920990 1#!/bin/sh
2#
3# openct OpenCT card service
4#
5# chkconfig: 2345 37 65
6#
7# description: OpenCT is a library for accessing smart card terminals.
8
9# Source function library
10. /etc/rc.d/init.d/functions
11
12RETVAL=0
13# See how we were called.
14case "$1" in
15 start)
16 # Check if the service is already running?
17 if [ ! -f /var/lock/subsys/openct ]; then
18 show "Initializing OpenCT status"
19 busy
20 openct-control init
21 RETVAL=$?
22 if [ $RETVAL -eq 0 ]; then
23 ok
24 touch /var/lock/subsys/openct
25 else
26 fail
27 fi
28 else
29 msg_already_running openct
30 fi
31 ;;
32 stop)
33 # Stop daemons.
34 if [ -f /var/lock/subsys/openct ]; then
35 show "Shutting down OpenCT"
36 busy
37 openct-control shutdown >/dev/null
38 ok
39 rm -f /var/lock/subsys/openct /var/run/openct/* >/dev/null 2>&1
40 else
41 msg_not_running openct
42 fi
43 ;;
44 status)
45 status openct
46 RETVAL=$?
47 ;;
48 restart)
49 $0 stop
50 $0 start
51 exit $?
52 ;;
53 reload)
54 $0 restart
55 ;;
56 *)
57 msg_usage "$0 {start|stop|restart|reload|status}"
58 exit 3
59 ;;
60esac
61
62exit $RETVAL
This page took 0.063939 seconds and 4 git commands to generate.