From: Mark Huang Date: Mon, 24 Apr 2006 15:49:32 +0000 (+0000) Subject: - start and stop local sendmail daemon X-Git-Tag: myplc-0_4-rc1~57 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6e4b0f410385bc5298762df2707e4d2f81e52eec;p=myplc.git - start and stop local sendmail daemon --- diff --git a/plc.d/mail b/plc.d/mail new file mode 100755 index 0000000..129bb3d --- /dev/null +++ b/plc.d/mail @@ -0,0 +1,42 @@ +#!/bin/bash +# +# priority: 250 +# +# Start local mail server. +# +# Mark Huang +# Copyright (C) 2006 The Trustees of Princeton University +# +# $Id: httpd,v 1.1 2006/04/06 21:51:59 mlhuang Exp $ +# + +# Source function library and configuration +. /etc/plc.d/functions + +case "$1" in + start) + if [ "$PLC_MAIL_ENABLED" != "1" ] ; then + exit 0 + fi + + MESSAGE=$"Starting mail server" + dialog "$MESSAGE" + + service sendmail start + check + + result "$MESSAGE" + ;; + + stop) + MESSAGE=$"Stopping mail server" + dialog "$MESSAGE" + + service sendmail stop + check + + result "$MESSAGE" + ;; +esac + +exit $ERRORS