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

M #-: Report failing probes (#4593)

This commit is contained in:
Jan Orel 2020-04-23 16:59:36 +02:00 committed by GitHub
parent 3a1fb4a884
commit c26dfc1570
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,9 +48,17 @@ CLIENT_PID_FILE=/tmp/one-monitord-$HID.pid
function start_client() {
rm $CLIENT_PID_FILE >/dev/null 2>&1
echo "$STDIN" | /usr/bin/env ruby $CLIENT $ARGV &
echo "$STDIN" | /usr/bin/env ruby $CLIENT $ARGV 2> /tmp/one-monitord-$HID.error &
CLIENT_PID=$!
echo $! > $CLIENT_PID_FILE
sleep 1
if [ -z "$CLIENT_PID" ] || ! ps -p $CLIENT_PID > /dev/null;
cat /tmp/one-monitord-$HID.error
exit 1
fi
echo $CLIENT_PID > $CLIENT_PID_FILE
}
# Stop the client