407N/A#!/usr/bin/ksh93
407N/A
407N/A#
407N/A# CDDL HEADER START
407N/A#
407N/A# The contents of this file are subject to the terms of the
407N/A# Common Development and Distribution License (the "License").
407N/A# You may not use this file except in compliance with the License.
407N/A#
407N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
407N/A# or http://www.opensolaris.org/os/licensing.
407N/A# See the License for the specific language governing permissions
407N/A# and limitations under the License.
407N/A#
407N/A# When distributing Covered Code, include this CDDL HEADER in each
407N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
407N/A# If applicable, add the following below this CDDL HEADER, with the
407N/A# fields enclosed by brackets "[]" replaced with your own identifying
407N/A# information: Portions Copyright [yyyy] [name of copyright owner]
407N/A#
407N/A# CDDL HEADER END
407N/A#
407N/A
407N/A#
407N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
407N/A# Use is subject to license terms.
407N/A#
407N/A
407N/Asource /lib/svc/share/smf_include.sh
407N/A
407N/Atypeset -r PRIVOXY_PRG=privoxy
407N/Atypeset -r PRIVOXY=/usr/lib/privoxy
407N/Atypeset -r PIDFILE=/var/log/privoxy/privoxy.pid
407N/Atypeset -r CONF_FILE=/etc/privoxy/config
407N/Atypeset -r PRIVOXY_USER=webservd
407N/Atypeset -r PRIVOXY_GROUP=webservd
407N/A
407N/A[[ ! -f ${CONF_FILE} ]] && exit $SMF_EXIT_ERR_CONFIG
407N/A
407N/Acase "$1" in
407N/Astart)
407N/A /bin/rm -f ${PIDFILE}
407N/A exec ${PRIVOXY} --pidfile "${PIDFILE}" \
407N/A --user "${PRIVOXY_USER}.${PRIVOXY_GROUP}" "$CONF_FILE" 2>&1
407N/A ;;
407N/A*)
407N/A print "Invalid method $1"
407N/A exit 1
407N/A ;;
407N/Aesac
407N/A
407N/A# not reached