test login
This commit is contained in:
parent
eac6dcd34d
commit
7d21ec4e72
23
.gitignore
vendored
23
.gitignore
vendored
@ -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
28
bml-status-tg-bot.sh
Normal 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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user