Skip to Content.
Sympa Menu

en - [sympa-users] Small patch to /etc/init.d/sympa

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Omen Wild <address@concealed>
  • To: "address@concealed" <address@concealed>
  • Subject: [sympa-users] Small patch to /etc/init.d/sympa
  • Date: Tue, 24 Aug 2010 16:08:13 -0700

I have attached a small patch for /etc/init.d/sympa. This is against
Sympa 6.0.1. The problem was that "/etc/init.d/sympa status" was
reporting that the bulk process had died and left the pidfile behind. The
real issue was that multiple bulk processes were running, and the pid
file had multiple pids listed in it. The patch uses tr to | the
different pids together so the egrep can find them.

--
Omen Wild
Security Administrator
(530) 752-1700
Index: etc/init.d/sympa
===================================================================
--- etc/init.d/sympa	(revision 1282)
+++ etc/init.d/sympa	(revision 1283)
@@ -83,11 +83,11 @@
     else
        # First try "/u1/home/sympa/*.pid" files
        if [ -f /var/sympa/$1.pid ] ; then
-             pid=`head -1 /var/sympa/$1.pid`
+             pid=`head -1 /var/sympa/$1.pid | tr -s ' ' '|'`
              if [ "$pid" != "" ] ; then
-                 running=`ps -A | grep "$pid"`
+                 running=`ps -A | egrep "$pid"`
                  if [ "$running" != "" ]; then
-                     echo "$1 (pid $pid) is active..."
+                     echo "$1 (pid(s) $pid) is active..."
                      return 0
                  else
                      echo "$1 died, pid file remains."

Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.19+.

Top of Page