Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37859543
en ru br
ALT Linux repos
S:8.18.0-alt0.Alpha2
5.0: 8.14.3-alt3
4.1: 8.14.4-alt0.M41.1
4.0: 8.14.4-alt0.M40.1
3.0: 8.13.4-alt3
+updates:8.13.8-alt1.M30.1

Group :: System/Servers
RPM: sendmail

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# /etc/init.d/sendmail
#
# sendmail This shell script takes care of starting and stopping
# sendmail.
#
# chkconfig: - 80 30
# description: Sendmail is a Mail Transport Agent, which is the program \
# that moves mail from one machine to another.
# processname: sendmail
# config: /etc/mail/submit.cf
# pidfile: /var/run/sendmail/submit.pid

### BEGIN INIT INFO
# Provides: sendmail
# Required-Start: $network
# Required-Stop: $network
# Default-Start:
# Default-Stop:
# Short-Description: Start sendmail at boot time
# Description: Enable service provided by sendmail.
### END INIT INFO

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network

RETVAL=0

PIDFILESUBMIT=/var/run/sendmail/submit.pid
LOCKFILESUBMIT=/var/lock/subsys/submit

start()
{
msg_starting "sendmail submit queue"
[ -d "/var/run/sendmail" ] || {
mkdir "/var/run/sendmail"
chown root,smmsp "/var/run/sendmail"
chmod 770 "/var/run/sendmail"
}
start_daemon --no-announce --pidfile "$PIDFILESUBMIT" --lockfile "$LOCKFILESUBMIT" --expect-user smmsp -- /usr/sbin/sendmail -L sm-msp-queue -Ac -q30m
RETVAL=$?

return $RETVAL
}

stop()
{
msg_stopping "sendmail submit queue"
stop_daemon --no-announce --pidfile "$PIDFILESUBMIT" --lockfile "$LOCKFILESUBMIT" -- sendmail
RETVAL=$?

return $RETVAL
}

restart()
{
stop
start
}

reload()
{
msg_reloading sendmail
stop_daemon -HUP sendmail
RETVAL=$?
return $RETVAL
}

case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
condstop)
if [ -e "$LOCKFILESUBMIT" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILESUBMIT" ]; then
restart
fi
;;
condreload)
if [ -e "$LOCKFILESUBMIT" ]; then
reload
fi
;;
status)
status --pidfile "$PIDFILESUBMIT" -- sendmail
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac

exit $RETVAL
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin