-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtempfreq_log
More file actions
33 lines (31 loc) · 961 Bytes
/
tempfreq_log
File metadata and controls
33 lines (31 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# oxr 2025
# Log de tempfreq con opciones de control de la frecuencia
# Este script es llamado automaticamente por tempfreq_pan que a su vez es
# incluido en control(un script del panel) al alcanzar cierta temperatura
xterm -T 'TempFreq_Log' -fc 4 -geometry 38x3+0-0 -e sh -c '
# PATH=$PATH:~/code
. isnum
tize -c 2 [ / -c 2 ] / "[l]log/no [i]info []refrescar [q]salir\n\
[nº]tope [m]max [d]med [n]min [+|-]mod\n\
[o ...]opcines de tempfreq [*]ejecutar"
nm=$tmp/tempfreq tty=`/bin/tty` ; echo $tty > $nm.tty
sleep 4
[ -e $nm.pid ] && e=true || e=false
case $e in
true) tempfreq l &
;;false) tempfreq 60 2 2 0 true &
;;esac
sleep 1 ; echo $$>$nm""_log.pid
_tf(){ echo $1 > $nm.$2 ; kill -TERM $x ;}
while : ; do read r
[ ${#r} -ne 0 ] && isnum $r && r="= $r"
read x < $nm.slp
case ${r%% *} in
o|l|i|h|r|m|d|n|+|-|=|"") _tf "$r" ops ;;
aqui) _tf $tty tty ;;
q) rm $nm""_log.pid ; $e || { _tf q ops ; sleep 1 ;} ; return ;;
*) $r ;;
esac ; done
' &
#