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