Update offsite-power-check.sh
This commit is contained in:
@@ -26,7 +26,6 @@ fi
|
|||||||
PWO_START(){
|
PWO_START(){
|
||||||
startup=true
|
startup=true
|
||||||
while true; do
|
while true; do
|
||||||
start=`date +%s`
|
|
||||||
upsinfo=$(upsc CP1500PFCLCD)
|
upsinfo=$(upsc CP1500PFCLCD)
|
||||||
if [ "$(echo "${upsinfo}" | grep 'input.voltage:' | sed 's/.*: //')" != "" ]; then
|
if [ "$(echo "${upsinfo}" | grep 'input.voltage:' | sed 's/.*: //')" != "" ]; then
|
||||||
OFFSITE_VOLTIN=$(echo "${upsinfo}" | grep 'input.voltage:' | sed 's/.*: //')
|
OFFSITE_VOLTIN=$(echo "${upsinfo}" | grep 'input.voltage:' | sed 's/.*: //')
|
||||||
@@ -95,7 +94,6 @@ PWO_START(){
|
|||||||
/usr/local/etc/rc.d/nut.sh restart
|
/usr/local/etc/rc.d/nut.sh restart
|
||||||
sleep 10s
|
sleep 10s
|
||||||
fi
|
fi
|
||||||
end=`date +%s`; runtime=$((end-start)); echo -e "\nruntime: ${runtime}\nsleeping for 5secs ... "
|
|
||||||
sleep 5s
|
sleep 5s
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user