pmp-check-mysql-status creates assigns paths for two temporary files as local variables TEMP1 and TEMP2 in main(). The script then sets up a trap to delete the two temporary files on EXIT. The trouble that I am noticing is that TEMP1 and TEMP2 are local to main() only and the trap is called outside of main() which means TEMP1 and TEMP2 are outside of the scope of the trap and the files never get removed. Below is part of a debug trace highlighting what I am seeing.
+++ mktemp /var/tmp/pmp-check-mysql-status.XXXX
++ local TEMP1=/var/tmp/pmp-check-mysql-status.jrvG
+++ mktemp /var/tmp/pmp-check-mysql-status.XXXX
++ local TEMP2=/var/tmp/pmp-check-mysql-status.K9Ex
++ trap 'rm -rf "${TEMP1}" "${TEMP2}"' EXIT
.
.
.
.
++ rm -rf '' ''
+ OUTPUT='OK Threads_running = 2'
+ EXITSTATUS=3
+ case "${OUTPUT}" in
+ EXITSTATUS=0
+ echo 'OK Threads_running = 2'
OK Threads_running = 2
+ exit 0
I have observed that the plugin works correctly on all of the platforms I use. Can you provide more details about the OS, version, and shell version you are using?