forked from snaptec/openWB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
auslademodus.sh
88 lines (82 loc) · 3.36 KB
/
auslademodus.sh
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash
auslademodus(){
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatus"; then
runs/set-current.sh 0 m
echo "$date LP1, Lademodus Stop. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuss1"; then
runs/set-current.sh 0 s1
echo "$date LP2, Lademodus Stop. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuss2"; then
runs/set-current.sh 0 s2
echo "$date LP3, Lademodus Stop. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuslp4"; then
runs/set-current.sh 0 lp4
echo "$date LP4, Lademodus Stop. Ladefreigabe noch aktiv. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuslp5"; then
runs/set-current.sh 0 lp5
echo "$date LP5, Lademodus Stop. Ladefreigabe noch aktiv. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuslp6"; then
runs/set-current.sh 0 lp6
echo "$date LP6, Lademodus Stop. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuslp7"; then
runs/set-current.sh 0 lp7
echo "$date LP7, Lademodus Stop. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuslp8"; then
runs/set-current.sh 0 lp8
echo "$date LP8, Lademodus Stop. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if (( llkombiniert > 300 )); then
runs/set-current.sh 0 m
runs/set-current.sh 0 s1
runs/set-current.sh 0 s2
runs/set-current.sh 0 lp4
runs/set-current.sh 0 lp5
runs/set-current.sh 0 lp6
runs/set-current.sh 0 lp7
runs/set-current.sh 0 lp8
echo "$date Alle Ladepunkte, Lademodus Stop. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
exit 0
}
semiauslademodus(){
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatus"; then
runs/set-current.sh 0 m
echo "$date LP1, Lademodus Standby. Ladefreigabe noch aktiv. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuss1"; then
runs/set-current.sh 0 s1
echo "$date LP2, Lademodus Standby. Ladefreigabe noch aktiv. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuss2"; then
runs/set-current.sh 0 s2
echo "$date LP3, Lademodus Standby. Ladefreigabe noch aktiv. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuslp4"; then
runs/set-current.sh 0 lp4
echo "$date LP4, Lademodus Standby. Ladefreigabe noch aktiv. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuslp5"; then
runs/set-current.sh 0 lp5
echo "$date LP5, Lademodus Standby. Ladefreigabe noch aktiv. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuslp6"; then
runs/set-current.sh 0 lp6
echo "$date LP6, Lademodus Standby. Ladefreigabe noch aktiv. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuslp7"; then
runs/set-current.sh 0 lp7
echo "$date LP7, Lademodus Standby. Ladefreigabe noch aktiv. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
if grep -q 1 "/var/www/html/openWB/ramdisk/ladestatuslp8"; then
runs/set-current.sh 0 lp8
echo "$date LP8, Lademodus Standby. Ladefreigabe noch aktiv. Stoppe Ladung" >> ramdisk/ladestatus.log
fi
exit 0
}