repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
add pdf rotate tools; fix lpstat datetime format pattern
[hband-tools.git]
/
óraállás-diktáló
/
aramszunet
blob
cc53a96ceae6a9ed7b44dd3092accdde145babe8
1
#!/bin/bash
2
3
# EXIT CODES
4
# 0 - outage is not expected
5
# 10 - outage IS expected
6
# * - crawler error (see there)
7
8
set -u
9
10
telepules
=
$1
11
utca
=
$2
12
13
.
/
aramszunetek
"
$telepules
"
|\
14
html2text
-utf8
|\
15
grep
"
$utca
"
16
17
ps
=(
${PIPESTATUS[@]}
)
18
if
[
${ps[0]}
!=
0
]
19
then
20
echo
"crawler error"
>&
2
21
exit
${ps[0]}
22
else
23
if
[
${ps[2]}
=
0
]
24
then
25
echo
"Áramszünet VÁRHATÓ"
>&
2
26
exit
10
27
else
28
echo
"Áramszünet nem várható"
>&
2
29
exit
0
30
fi
31
fi