Created
March 31, 2020 06:48
-
-
Save nkirnos/dd5fb4711f655b1a0c15199f24d5ae2d to your computer and use it in GitHub Desktop.
Revisions
-
nkirnos created this gist
Mar 31, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #/bin/bash load=$(cat /proc/loadavg | awk '{ print $2}') threshold=0.3 echo $load check=$(echo "$threshold > $load" | /usr/bin/bc) if test "$check" = "1"; then sudo /sbin/shutdown now fi