Files
postfix/SNAP/postfix.init
Jay Larson c456a05512 The following changes were made:
* Added patch routine
  * Added patch to disable nis in default config
  * Updated init script to use status_of_proc
  * usher will now restart postfix if running
2018-06-08 09:28:52 -05:00

47 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
### BEGIN INIT INFO
# Provides: postfix
# Required-Start: $syslog $local_fs $network
# Should-Start: $remote_fs openldap saslauthd
# Required-Stop: $network
# Should-Stop: $remote_fs openldap saslauthd
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Postfix MTA
# Description: Controls the Postfix Mail Transfer Agent
### END INIT INFO
. /lib/lsb/init-functions
BINFILE=/usr/lib/postfix/master
PIDFILE=/var/spool/postfix/pid/master.pid
case "$1" in
start)
log_init_msg "Starting Postfix"
start_daemon -p "${PIDFILE}" /usr/sbin/postfix start 2> /dev/null && \
log_success_msg || log_failure_msg
;;
stop)
log_init_msg "Stopping Postfix"
killproc -p "${PIDFILE}" ${BINFILE} && log_success_msg || log_failure_msg
;;
reload)
log_init_msg "Reloading Postfix"
killproc -p "${PIDFILE}" ${BINFILE} -HUP && log_success_msg || \
log_failure_msg
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
status_of_proc -p "$PIDFILE" "$DAEMON"
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac