1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-25 23:21:29 +03:00

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

This commit is contained in:
Jan Orel 2020-06-18 13:22:37 +02:00 committed by GitHub
parent 2573eab515
commit ed8b4a2d18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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