diff --git a/metronom-login.script.nix b/metronom-login.script.nix index ef68b8f..bc40f66 100644 --- a/metronom-login.script.nix +++ b/metronom-login.script.nix @@ -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