[Exim] Small change to exiwhat

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Nico Erfurth
Fecha:  
A: exim-users
Asunto: [Exim] Small change to exiwhat
Hi,

the current "ps xau | egrep" solution is too slow for exim, i changed it
a little bit, so it works with all those fast exim-processes. With
killall it does not complain about not existing PID's anymore (at least
on my system, even on high load).

Apply this patch, if you want to try it.


--- exiwhat.org Mon Jul  8 15:56:14 2002
+++ exiwhat     Mon Jul  8 15:58:41 2002
@@ -63,10 +63,16 @@
    exit 1
  fi


-$ps_cmd $ps_arg | \
-  egrep "$egrep_arg" | \
-  awk "{print \"kill $kill_arg \"\$1}" | \
-  uniq | sh
+# Is killall available on ALL systems?
+
+if [ `which killall 2>/dev/null` ] ; then
+  killall $kill_arg exim ;
+else
+  $ps_cmd $ps_arg | \
+    egrep "$egrep_arg" | \
+    awk "{print \"kill $kill_arg \"\$1}" | \
+    uniq | sh
+fi


sleep 1