In case my Internet connectivity goes down, I created a script that is called via crontab every minute or so.
It simply checks if Google DNS is reachable. If not, it shuts down the miner process:
# /usr/bin/bash
#
# Check if Google DNS (8.8.8.8) is reachable.
# if down, kill process futurebit-miner
#
ping -w 5 8.8.8.8 > /dev/null 2>&1
if [[ $? -eq 0 ]]; then
# Google is UP, do nothing
else
# Google is DOWN, kill miner process
kill -9 $(pidof futurebit-miner)
fi
Have you verified, that closing down mining process, stops miner physically and it goes cold after a minute or two?