1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

M #-: Avoid killing other local monitord clients (#25)

(cherry picked from commit ed8b4a2d18d31d747e19a8038f52d22bb117eabd)
This commit is contained in:
Jan Orel 2020-06-18 13:22:37 +02:00 committed by Ruben S. Montero
parent dfaa63343a
commit 2993873d04
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ CLIENT_PID_FILE=/tmp/one-monitord-$HID.pid
[ -f $CLIENT_PID_FILE ] || exit 0
running_pid=$(cat $CLIENT_PID_FILE)
pids=$(ps axuwww | grep -e "/monitord-client.rb.*${HID} " | grep -v grep | \
pids=$(ps axuwww | grep "/monitord-client.rb [^\s]* ${HID} ${HNAME}" | grep -v grep | \
awk '{ print $2 }' | grep -v "^${running_pid}$")
if [ -n "$pids" ]; then

View File

@ -33,7 +33,7 @@ function run_dir {
cd $1
for i in `ls * | grep -E -v '\.(rpmnew|rpmsave|dpkg-\w+)$'`;do
if [ -x "$i" ]; then
result=$(echo ${STDIN} | ./$i ${ARGUMENTS})
result=$(echo ${STDIN} | ./$i ${ARGUMENTS} 2>&1)
EXIT_CODE=$?
if [ "x${EXIT_CODE}" != "x0" ]; then