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:
parent
2573eab515
commit
ed8b4a2d18
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user