metronom-login: fix OK/unsuccessful detection
This commit is contained in:
parent
c7f5a0b8de
commit
94b4ac3163
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ pkgs.writeShellScriptBin "metronom-login" ''
|
|||
csrf="$(curl --interface $(cat ~/.direct-netif) "$ip/de/" | grep CSRFToken | sed -E 's/.*value="([0-9a-f]*)".*/\1/')"
|
||||
echo "csrf is $csrf"
|
||||
resp="$(curl --interface $(cat ~/.direct-netif) "$ip/de/" -X POST -H "Cookie: csrf=$csrf" --data-raw "login=true&CSRFToken=$csrf" | wc -l)"
|
||||
if [ $resp = 1 ] ; then
|
||||
if [ $resp = 0 ] ; then
|
||||
echo OK
|
||||
else
|
||||
echo unsuccessful
|
||||
|
|
Loading…
Add table
Reference in a new issue