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