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