blob: 80b1a74ccae61b22d16c91847de2771b99467d4d (
plain)
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
|
#!/bin/bash
. settings
logger -t sublab-updater starting status update
insertstatus() {
local ec=$?
local status
if [ $ec -eq 0 ]; then
status=online
else
status=offline
fi
cp ${WEBPATH}/csstemplate/${status}.${1}.status.css ${WEBPATH}/public/css/${1}.status.css.new
mv -f ${WEBPATH}/public/css/${1}.status.css.new ${WEBPATH}/public/css/${1}.status.css
}
# Ping Taifun
ping -q -c 2 -W 1 172.22.83.5 &> /dev/null
insertstatus taifun
# Ping Trieste
ping -q -c 2 -W 1 172.22.80.4 &> /dev/null
insertstatus trieste
# Ping Nautilus
ping -q -c 2 -W 1 172.22.80.7 &> /dev/null
insertstatus nautilus
exit 0
|