summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Vagelpohl <jens@netz.ooo>2007-11-11 19:37:23 +0000
committerJens Vagelpohl <jens@netz.ooo>2007-11-11 19:37:23 +0000
commita829ff03bd2eeae4702cdbef5d2bd790f5a3a848 (patch)
treec82f64c592a9feb083fb0b06e3b9fbf8f91b220d
parent5129c7f26b1704175588a35b2ed14c13da8fe77a (diff)
downloadMaildropHost-a829ff03bd2eeae4702cdbef5d2bd790f5a3a848.zip
MaildropHost-a829ff03bd2eeae4702cdbef5d2bd790f5a3a848.tar.gz
- maildropctl: Improve behavior when maildropctl is run and finds
an existing PID file. Thanks go to Johnny Souza. (http://www.dataflake.org/tracker/issue_00583)
-rw-r--r--CHANGES.txt4
-rw-r--r--maildrop/bin/maildropctl13
2 files changed, 15 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 9bfd238..eeb2a3e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -16,6 +16,10 @@ MaildropHost version and change information
SMTP conversation with the mail server, found by Junyong Pan.
(http://www.dataflake.org/tracker/issue_00568)
+ - maildropctl: Improve behavior when maildropctl is run and finds
+ an existing PID file. Thanks go to Johnny Souza.
+ (http://www.dataflake.org/tracker/issue_00583)
+
Features added:
- maildrop.py: Add a setting that prevents detaching from the
diff --git a/maildrop/bin/maildropctl b/maildrop/bin/maildropctl
index ca73061..a09fa28 100644
--- a/maildrop/bin/maildropctl
+++ b/maildrop/bin/maildropctl
@@ -89,8 +89,17 @@ stop)
start)
if [ -f $MAILDROP_PID_FILE ]
then
- echo "Error: maildrop daemon already started."
- ERROR=1
+ kill -0 `cat $MAILDROP_PID_FILE` 2> /dev/null
+ if [ "$?" == "0" ]
+ then
+ echo "Error: maildrop daemon already started."
+ ERROR=1
+ else
+ echo 'Warning: maildrop daemon not found. Removing PID file'
+ rm -f $MAILDROP_PID_FILE
+ start
+ ERROR=$?
+ fi
else
start
ERROR=$?