Use core function to check if Qmail is running
authorJamie Cameron <jcameron@webmin.com>
Tue, 5 Jul 2011 23:07:20 +0000 (16:07 -0700)
committerJamie Cameron <jcameron@webmin.com>
Tue, 5 Jul 2011 23:07:20 +0000 (16:07 -0700)
qmailadmin/delete_queue.cgi
qmailadmin/delete_queues.cgi

index faadf27..c930843 100755 (executable)
@@ -8,7 +8,7 @@ require './qmail-lib.pl';
 -r $in{'file'} || &error($text{'delete_egone'});
 $in{'file'} =~ /(\d+)\/(\d+)$/ || &error($text{'delete_ebogus'});
 $id = "$1/$2";
-($pid) = &find_byname("qmail-send");
+$pid = &is_qmail_running();
 if ($pid) {
        &stop_qmail();
        }
index 225da9c..884e9c9 100755 (executable)
@@ -8,7 +8,7 @@ require './qmail-lib.pl';
 @files = split(/\0/, $in{'file'});
 if ($in{'confirm'}) {
        # Delete messages
-       ($pid) = &find_byname("qmail-send");
+       $pid = &is_qmail_running();
        if ($pid) {
                &stop_qmail();
                }