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