token get

This commit is contained in:
qiaofeng1227 2023-06-17 10:45:17 +08:00
parent a55fa006c6
commit fdf2f55c48

View file

@ -414,7 +414,7 @@ sleep 25
echo "edit nginxproxymanager password..."
login_data=$(curl -X POST -H "Content-Type: application/json" -d '{"identity":"admin@example.com","scope":"user", "secret":"changeme"}' http://127.0.0.1:9092/api/tokens)
sleep 3
token=echo $login_data | grep -Po '(?<="token":")[^"]*'
token=$(echo $login_data | grep -Po '(?<="token":")[^"]*')
#token=$(echo $login_data | jq -r '.token')
new_password=$(docker run --name pwgen backplane/pwgen 15)!
docker rm -f pwgen