components/sendmail/files/init.d-sendmail
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Fri, 07 Oct 2016 22:43:37 -0700
changeset 7203 c08b4f974065
parent 3649 4006eaaa7d29
permissions -rw-r--r--
21866045 move /etc/pam.d/gdm-autologin from system/core-os to system/display-manager/gdm
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3649
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     1
#!/usr/sbin/sh
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     2
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     3
# CDDL HEADER START
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     4
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     5
# The contents of this file are subject to the terms of the
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     6
# Common Development and Distribution License (the "License").
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     7
# You may not use this file except in compliance with the License.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     8
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     9
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    10
# or http://www.opensolaris.org/os/licensing.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    11
# See the License for the specific language governing permissions
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    12
# and limitations under the License.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    13
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    14
# When distributing Covered Code, include this CDDL HEADER in each
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    15
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    16
# If applicable, add the following below this CDDL HEADER, with the
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    17
# fields enclosed by brackets "[]" replaced with your own identifying
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    18
# information: Portions Copyright [yyyy] [name of copyright owner]
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    19
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    20
# CDDL HEADER END
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    21
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    22
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    23
# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    24
#
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    25
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    26
# This service is managed by smf(5).  Thus, this script provides
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    27
# compatibility with previously documented init.d script behaviour.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    28
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    29
case "$1" in
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    30
'restart')
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    31
	# The previous init.d/sendmail restart behaviour matches
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    32
	# the smf(5) 'refresh' semantics.
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    33
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    34
	svcadm refresh network/smtp:sendmail
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    35
	svcadm refresh network/sendmail-client:default
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    36
	;;
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    37
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    38
'start')
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    39
	svcadm enable -t network/smtp:sendmail
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    40
	svcadm enable -t network/sendmail-client:default
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    41
        ;;
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    42
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    43
'stop')
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    44
	svcadm disable -t network/smtp:sendmail
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    45
	svcadm disable -t network/sendmail-client:default
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    46
        ;;
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    47
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    48
*)
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    49
        echo "Usage: $0 { start | stop | restart }"
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    50
        exit 1
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    51
        ;;
4006eaaa7d29 20355401 add sendmail to Userland
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    52
esac