Solaris10:squid-3.0.STABLE11導入:/lib/svc/method/squid

提供:KinusatiWiki
移動: 案内, 検索
#!/sbin/sh
#
# ident "@(#)squid       1.2     04/11/11 SMI"
#

. /lib/svc/share/smf_include.sh

SQUID_HOME=/usr/local/squid
CONF_FILE=$SQUID_HOME/etc/squid.conf

[ ! -f ${CONF_FILE} ] &&  exit $SMF_EXIT_ERR_CONFIG

case "$1" in
start)
        cmd=""
        ;;
refresh)
        cmd=" -k reconfigure"
        ;;
stop)
        cmd=" -k shutdown"
        ;;
*)
        echo "Usage: $0 {start|stop|refresh}"
        exit 1
        ;;
esac

exec ${SQUID_HOME}/sbin/squid $cmd 2>&1


個人用ツール