#!/bin/bash
### BEGIN INIT INFO
# Provides: mantis-smtp
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop Mantis SMTP gateway server
# Description: Mantis SMTP Server is a SMTP Gateway for Mantis
# bug tracker
### END INIT INFO
# mantis-smtp Startup script for the Mantis SMTP Server
#
# chkconfig: 2345 80 30
# description: Mantis SMTP Server is a SMTP Gateway for Mantis
# bug tracker
# processname: mantis-smtp
# config: /etc/sysconfig/mantis-smtp
# config: /etc/mantis-smtp.conf
# pidfile: /var/run/mantis-smtp.pid
# Source function library.
if [ -f /etc/redhat-release ]
then
. /etc/rc.d/init.d/functions
elif [ -f /etc/debian_version ]
then
. /lib/lsb/init-functions
fi
prog="Mantis SMTP Server"
pidfile=/var/run/mantis-smtp.pid
mantis_smtp_bin=/usr/bin/mantis-smtp
configfile=/etc/mantis-smtp.conf
logfile=/var/log/mantis-smtp.log
OPTIONS="-c $configfile --daemon --pid ${pidfile} -l $logfile -H 127.0.0.1 -p 10029"
STOP_TIMEOUT=10
if [ -f /etc/redhat-release -a -f /etc/sysconfig/mantis-smtp ]
then
. /etc/sysconfig/mantis-smtp
elif [ -f /etc/debian_version ]
then
. /etc/default/mantis-smtp
fi
start() {
if [ -f /etc/redhat-release ]
then
echo -n $"Starting $prog: "