All pastes #80844 Raw Edit

Motoko

public text v1 · immutable
·published 2006-07-06 21:37 UTC
rendered paste body
#!/bin/sh
# Start/stop/restart postfix.

# Start postfix:
postfix_start() {
  if [ -x /usr/sbin/postfix ]; then
    echo "Starting Postfix:  /usr/sbin/postfix"
    /usr/sbin/postfix start
  fi
}

# Stop postfix:
postfix_stop() {
  if [ -x /usr/sbin/postfix ]; then
    echo "Stopping Postfix:  /usr/sbin/postfix"
    /usr/sbin/postfix stop
  fi
}

# Restart postfix:
postfix_restart() {
  if [ -x /usr/sbin/postfix ]; then
    echo "Reloading Postfix:  /usr/sbin/postfix"
    /usr/sbin/postfix reload
  fi
}

case "$1" in
'start')
  postfix_start
  ;;
'stop')
  postfix_stop
  ;;
'restart')
  postfix_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac