Skip to content
Permalink
Browse files

Fix SSL message "Init SSL without certificate database"

  • Loading branch information...
allion committed Dec 10, 2014
1 parent 5ff5670 commit 72c283730aaae0e1701b2c23595c13b0338f03cd
Showing with 3 additions and 3 deletions.
  1. +3 −3 sh/ups_status.sh
@@ -6,7 +6,7 @@ if [ $ups = ups.discovery ]; then

echo -e "{\n\t\"data\":["
first=1
/bin/upsc -l | while read discovered ; do
/bin/upsc -l 2>&1 | grep -v SSL | while read discovered ; do
if [ $first -eq 0 ]; then
echo -e ","
fi
@@ -19,7 +19,7 @@ else
key=$2

if [ $key = ups.status ]; then
state=`/bin/upsc $ups $key`
state=`/bin/upsc $ups $key 2>&1 | grep -v SSL`
case $state in
OL) echo 1 ;; #'On line (mains is present)' ;;
OB) echo 2 ;; #'On battery (mains is not present)' ;;
@@ -36,7 +36,7 @@ if [ $key = ups.status ]; then
* ) echo 0 ;; #'unknown state' ;;
esac
else
/bin/upsc $ups $key
/bin/upsc $ups $key 2>&1 | grep -v SSL
fi

fi

0 comments on commit 72c2837

Please sign in to comment.
You can’t perform that action at this time.