#!/bin/bash # # priority: 250 # # Start local mail server. # # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # # $Id: mail,v 1.3 2006/06/23 20:29:22 mlhuang Exp $ # # Source function library and configuration . /etc/plc.d/functions . /etc/planetlab/plc_config # Be verbose set -x case "$1" in start) if [ "$PLC_MAIL_ENABLED" != "1" ] ; then exit 0 fi MESSAGE=$"Starting mail server" dialog "$MESSAGE" # Add apache to list of users that can send mail as others # without a warning, so that the API can send out mail. echo "apache" >/etc/mail/trusted-users service sendmail start check result "$MESSAGE" ;; stop) MESSAGE=$"Stopping mail server" dialog "$MESSAGE" service sendmail stop check result "$MESSAGE" ;; esac exit $ERRORS