Added a pause and stop function to check-system.sh and tweaked the mysql functions