svc-pcscd revision 6131
1754N/A#!/sbin/sh
1754N/A#
1754N/A# CDDL HEADER START
1754N/A#
1754N/A# The contents of this file are subject to the terms of the
1754N/A# Common Development and Distribution License (the "License").
1754N/A# You may not use this file except in compliance with the License.
1754N/A#
1754N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1754N/A# or http://www.opensolaris.org/os/licensing.
1754N/A# See the License for the specific language governing permissions
1754N/A# and limitations under the License.
1754N/A#
1754N/A# When distributing Covered Code, include this CDDL HEADER in each
1754N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1754N/A# If applicable, add the following below this CDDL HEADER, with the
1754N/A# fields enclosed by brackets "[]" replaced with your own identifying
1754N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1754N/A#
1754N/A# CDDL HEADER END
5680N/A#
5680N/A#
5575N/A# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
1754N/A#
1754N/A
1754N/A. /lib/svc/share/smf_include.sh
1754N/A
1754N/ANAME=pcscd
1754N/ADAEMON=/usr/sbin/$NAME
1754N/APIDFILE=$SMF_SYSVOL_FS/$NAME.pid
1754N/A
1754N/A# exit if the server daemon is not installed
1754N/A[ -x "$DAEMON" ] || exit 0
1754N/A
1754N/Acase "$1" in
1754N/A'start')
1754N/A $DAEMON >/dev/null 2>&1 &
1754N/A ;;
2899N/A
2899N/A# attribute exec=':kill' in manifest pcscd.xml stops the pcscd daemon.
3817N/A
3817N/A'restart')
3817N/A if [ -f "$PIDFILE" ]; then
1754N/A /usr/bin/kill -HUP `/usr/bin/cat $PIDFILE`
1938N/A fi
1754N/A ;;
1754N/A*)
1754N/A echo "Usage: $0 {start|restart}"
1754N/A exit 1
1754N/A ;;
3743N/Aesac
3743N/Aexit $?
5575N/A
5575N/A