Browse Source

'check_unifi65.sh' ändern

Daniel Wenzel 3 years ago
parent
commit
d067d1aa1f
1 changed files with 1 additions and 2 deletions
  1. 1 2
      check_unifi65.sh

+ 1 - 2
check_unifi65.sh

@@ -161,8 +161,7 @@ strCurlCommand="${strCurlBinary} --tlsv1 --silent --cookie ${strCookieFile} --co
 strLogOutAndCleanUp="${strCurlCommand} $strBaseURL/logout > /dev/null 2>&1 ; rm -f ${strCookieFile}"
 
 #Anmelden am Controller
-strLoginStatus=$(${strCurlCommand} -X POST -H "Content-Type: application/json" --referer ${strBaseURL}/login --cookie ${strCookieFile} --cookie-jar ${strCookieFile} --insecure -d '{"username": "monitoring", "password": "Ye1tWJXLk5Av4Clx"}' ${strBaseURL}/api/login | ${strJQBinary} '.meta.rc')
-
+strLoginStatus=$(${strCurlCommand} -X POST -H "Content-Type: application/json" --referer ${strBaseURL}/login --cookie ${strCookieFile} --cookie-jar ${strCookieFile} --insecure -d "{\"username\": \"$strUsername\", \"password\": \"$strPassword\"}" ${strBaseURL}/api/login | ${strJQBinary} '.meta.rc')
 
 if [ "$strLoginStatus" != "\"ok\"" ] ; then
   echo "Unknown: Anmeldung am Unifi-Controller fehlgeschlagen"