This commit is contained in:
root 2022-12-09 16:36:49 +00:00
parent 0e10ce6f34
commit f5a8c4f994
2 changed files with 17 additions and 1 deletions

16
tilserv/mksuser Executable file
View File

@ -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

View File

@ -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'