Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #current_temp_0.value 68
- uptime=$(</proc/uptime)
- uptime=${uptime%%.*}
- echo $uptime
- temp=`/home/user/getgpustat 0 current_temp_0`
- echo $temp
- #600 second, you can change the minimum uptime here:
- if [ $uptime -gt 600 ]
- then
- #50°, you can change minimum temp here:
- if [ $temp -lt 50 ]
- then
- coldreboot
- else
- echo "Temps inf a 50: $temp";
- fi
- else
- echo "Uptime inferieur a 600: $uptime";
- fi
Advertisement
Add Comment
Please, Sign In to add comment