test login

This commit is contained in:
Shihaam Abdul Rahman 2021-11-29 17:21:49 +05:00
parent eac6dcd34d
commit 7d21ec4e72
2 changed files with 28 additions and 23 deletions

23
.gitignore vendored
View File

@ -1,25 +1,2 @@
# ---> Laravel
/vendor/
node_modules/
npm-debug.log
yarn-error.log
# Laravel 4 specific
bootstrap/compiled.php
app/storage/
# Laravel 5 & Lumen specific
public/storage
public/hot
# Laravel 5 & Lumen specific with changed public path
public_html/storage
public_html/hot
storage/*.key
.env
Homestead.yaml
Homestead.json
/.vagrant
.phpunit.result.cache

28
bml-status-tg-bot.sh Normal file
View File

@ -0,0 +1,28 @@
#!/bin/bash
source .env
login(){
LOGIN=$(curl -s -c $COOKIE $BML_URL/login \
--data-raw username=$BML_USERNAME \
--data-raw password=${BML_PASSWORD} \
| jq -r .code)
if [ "$LOGIN" = "0" ]
then
echo Login success
elif [ "$LOGIN" = "20" ]
then
sleep 1.5
echo Account Locked!
echo Please reset password and login again.
elif [ "$LOGIN" = "2" ]
then
echo Password or Username Incorrect
elif [ "$LOGIN" = "37" ]
then
echo Down for Maintenance
echo Try again later
exit
else
echo Unknown Error
exit
fi
}