temps config
This commit is contained in:
1 parent
0b46382360
commit
e41e2a6dfe
2 files changed
+8
-3
No files matched your search
@@ -6,6 +6,7 @@ const config = require('./config.json'),
|
||||
|
||||
ex('sensors -j').then(out => {
|
||||
out = JSON.parse(out)
|
||||
console.log()
|
||||
console.log(`Temperatures:`)
|
||||
for(let adapter in out){
|
||||
console.log(` \x1b[96m${adapter}\x1b[0m`)
|
||||
@@ -18,8 +19,8 @@ ex('sensors -j').then(out => {
|
||||
|
||||
console.log(` \x1b[34m${prop}:\x1b[0m ${
|
||||
stat > 1 ? '\x1b[1m\x1b[31m' :
|
||||
stat > .85 ? '\x1b[31m' :
|
||||
stat > .5 ? '\x1b[93m' : ''
|
||||
stat > config.warn ? '\x1b[31m' :
|
||||
stat > config.high ? '\x1b[93m' : ''
|
||||
}${out[adapter][prop][tmp]}°C\x1b[0m`)
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"publicip": "/home/mathias/git/ovh-dynhost/logs/short.log",
|
||||
"theme": "\\e[32m",
|
||||
"hostname": "odin"
|
||||
"hostname": "odin",
|
||||
"temps": {
|
||||
"warn": 0.85,
|
||||
"high": 0.6
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user