forked from vern/scripts
soju
This commit is contained in:
parent
0e10ce6f34
commit
f5a8c4f994
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env -S bash -e
|
||||
|
||||
[[ -z "$2" ]] && {
|
||||
printf "Usage: %s username password\n" "$0"
|
||||
exit 1
|
||||
}
|
||||
|
||||
{
|
||||
cat << EOF
|
||||
NICK root
|
||||
PASS $(</root/priv/sojupass)
|
||||
USER root bnc.vern.cc bnc.vern.cc root
|
||||
PRIVMSG BouncerServ :user create -username ${1} -password ${2}
|
||||
QUIT
|
||||
EOF
|
||||
} | openssl s_client -connect vern.cc:6698 -quiet
|
|
@ -2,5 +2,5 @@
|
|||
client_id="$(curl -s https://pt.vern.cc/api/v1/oauth-clients/local | jq -r '.client_id')"
|
||||
client_secret="$(curl -s https://pt.vern.cc/api/v1/oauth-clients/local | jq -r '.client_secret')"
|
||||
curl -s -X POST \
|
||||
-d "client_id=${client_id}&client_secret=${client_secret}&grant_type=password&response_type=code&username=root&password=$(cat ~/priv/peertube-pass)" \
|
||||
-d "client_id=${client_id}&client_secret=${client_secret}&grant_type=password&response_type=code&username=root&password=$(</priv/peertube-pass)" \
|
||||
https://pt.vern.cc/api/v1/users/token | jq -r '.access_token'
|
||||
|
|
Loading…
Reference in New Issue