summaryrefslogtreecommitdiff
path: root/network/exim/contrib/rc.exim.new
diff options
context:
space:
mode:
authorThomas Morper <thomas@beingboiled.info>2011-01-30 09:19:29 -0600
committerRobby Workman <rworkman@slackbuilds.org>2011-01-30 09:19:29 -0600
commit7256be53cd7d1e126257bd3ef74bcf7e2d01c6e8 (patch)
treef6ca9df884a361b5f7cbd95f0a5be156f4aa79bc /network/exim/contrib/rc.exim.new
parente99dbd7cd14ebd9ebaa17ae976e1539af5c37fd8 (diff)
downloadslackbuilds-7256be53cd7d1e126257bd3ef74bcf7e2d01c6e8.tar.gz
network/exim: Updated for version 4.74.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/exim/contrib/rc.exim.new')
-rw-r--r--network/exim/contrib/rc.exim.new62
1 files changed, 14 insertions, 48 deletions
diff --git a/network/exim/contrib/rc.exim.new b/network/exim/contrib/rc.exim.new
index 16d1ca71d0..3fb62f1bf3 100644
--- a/network/exim/contrib/rc.exim.new
+++ b/network/exim/contrib/rc.exim.new
@@ -1,62 +1,28 @@
#!/bin/sh
+# Start/stop/restart the Exim MTA
-# /etc/rc.d/rc.exim - start/stop/restart the exim mail transfer agent.
-#
-# Thales A. Tsailas <ttsailas@enforcingit.com>
-# Thomas Morper <thomas@beingboiled.info>
+# Run as SMTP listener daemon, do queue runs every 15 mins.
+EXIM_ARGS="-bd -q15m"
-PIDFILE=/var/run/exim.pid
-
-# the TIME option causes Exim to run as a daemon, starting a queue runner
-# process at intervals specified by the given time value. (ie 5m, 1h etc).
-TIME=15m
-
-exim_start() {
- echo "Starting exim..."
- /usr/sbin/exim -bd ${TIME:+-q$TIME}
-}
-
-exim_stop() {
- echo "Shutting down exim..."
- killall exim
- rm -f $PIDFILE
-}
-
-exim_reload() {
- echo "Reloading exim configuration..."
- if [ -f $PIDFILE ]; then
- kill -HUP $(cat $PIDFILE)
- fi
-}
-
-exim_status() {
- if [ -f /var/run/exim.pid ]; then
- echo "exim is running...";
- else
- echo "exim is not running...";
- fi
-}
-
-# See how we were called.
case "$1" in
start)
- exim_start
+ echo "Starting Exim"
+ /usr/sbin/exim $EXIM_ARGS
;;
stop)
- exim_stop
- ;;
- restart)
- exim_stop
- sleep 2
- exim_start
+ echo "Stopping Exim"
+ pkill -f /usr/sbin/exim
;;
reload)
- exim_reload
+ echo "Reloading Exim config"
+ pkill -HUP -f /usr/sbin/exim
;;
- status)
- exim_status
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
;;
*)
- echo $"Usage: $0 {start|stop|restart|reload|status}"
+ echo "usage: $0 {start|stop|reload|restart}"
;;
esac