usr/src/cmd/ser/ser
changeset 16 4481d72bca2d
parent 15 24b3ef38fbcd
child 17 4c6e1d5e1470
equal deleted inserted replaced
15:24b3ef38fbcd 16:4481d72bca2d
     1 #!/bin/sh
       
     2 #
       
     3 # CDDL HEADER START
       
     4 #
       
     5 # The contents of this file are subject to the terms of the
       
     6 # Common Development and Distribution License (the "License").
       
     7 # You may not use this file except in compliance with the License.
       
     8 #
       
     9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
    10 # or http://www.opensolaris.org/os/licensing.
       
    11 # See the License for the specific language governing permissions
       
    12 # and limitations under the License.
       
    13 #
       
    14 # When distributing Covered Code, include this CDDL HEADER in each
       
    15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    16 # If applicable, add the following below this CDDL HEADER, with the
       
    17 # fields enclosed by brackets "[]" replaced with your own identifying
       
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    19 #
       
    20 # CDDL HEADER END
       
    21 #
       
    22 #
       
    23 # Copyright 2004 Sun Microsystems, Inc.	 All rights reserved.
       
    24 # Use is subject to license terms.
       
    25 #
       
    26 #ident	"@(#)ser	1.3	06/03/18 SMI"
       
    27 #
       
    28 # if SUNWseru or config is not installed exit.
       
    29 [ ! -x /usr/sfw/sbin/ser ] || [ ! -f /etc/sfw/ser/ser.cfg ] && exit 0
       
    30 
       
    31 PATH=$PATH:/usr/sfw/sbin; export PATH
       
    32 SIP_DOMAIN="SETUP_DOMAIN"; export SIP_DOMAIN
       
    33 
       
    34 if [ -z $SIP_DOMAIN ] || [ $SIP_DOMAIN = SETUP_DOMAIN ]
       
    35 then
       
    36 	echo setup SIP_DOMAIN in $0
       
    37 	exit 1
       
    38 fi
       
    39 
       
    40 case "$1" in
       
    41 'start')
       
    42 
       
    43 	#
       
    44 	# sleep is added to give mysqld time to start.
       
    45 	# sleep can be removed if ser is being used without mysql
       
    46 	#
       
    47 	(sleep 5; serctl start) &
       
    48 	;;
       
    49 
       
    50 'stop')
       
    51 	serctl stop
       
    52 	;;
       
    53 
       
    54 'restart')
       
    55 	serctl restart
       
    56 	;;
       
    57 
       
    58 *)
       
    59         echo "Usage: $0 { start | stop | restart }"
       
    60         exit 1
       
    61         ;;
       
    62 esac
       
    63 exit 0