Hi Hyperic
I have an issue on the QNAP NAS when i try stopping Hyperic using "./hq-agent.sh stop"
It would be stuck on "Waiting for HQ Agent to exit..." forever.
Afer some investigating i found out that the check whether Hyperic stopped properly is not working properly.
bundles/agent-5.0.0/bin/hq-agent.sh - testpid function
The following line tries to obtain the pid number of the Hyperic process
pid=$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1
2>/dev/null
The problem is that while grep is removed from the returned ps list, ps itself is not removed which means this command will allways return a pid number
I fixed this by changing it to:
pid=$PSEXE -p $pid | grep $pid | grep "$WRAPPER_CMD_PS" | awk '{print $1}' | tail -1
2>/dev/null
Don't know if this is a proper fix but it works for me
Kind regards
Anonymous