parent
9b909fe572
commit
62fcccf0c7
@ -0,0 +1,14 @@ |
||||
#!/bin/sh |
||||
|
||||
client_name="$1" |
||||
if [ -z "$client_name" ]; then |
||||
echo >&2 "usage: $0 client-name" |
||||
exit 1 |
||||
fi |
||||
|
||||
kcadm.sh get clients \ |
||||
-r "$REALM" \ |
||||
-q "clientId=$client_name" \ |
||||
--fields id \ |
||||
--format csv \ |
||||
--noquotes |
@ -1,3 +1,6 @@ |
||||
#!/bin/bash -x |
||||
|
||||
client-create mastodon "$MASTODON_HOSTNAME.$DOMAIN_NAME" "$MASTODON_CLIENT_SECRET" </dev/null |
||||
client_id=$(client-create mastodon "$MASTODON_HOSTNAME.$DOMAIN_NAME" "$MASTODON_CLIENT_SECRET" </dev/null) |
||||
|
||||
echo '{"name":"admin"}' | kcadm.sh create -r "$REALM" "clients/$client_id/roles" -f - |
||||
echo '{"name":"moderator"}' | kcadm.sh create -r "$REALM" "clients/$client_id/roles" -f - |
||||
|
@ -1,2 +1,4 @@ |
||||
#!/bin/bash -x |
||||
client-create pixelfed "$PIXELFED_HOSTNAME.$DOMAIN_NAME" "$PIXELFED_CLIENT_SECRET" </dev/null |
||||
client_id=$(client-create pixelfed "$PIXELFED_HOSTNAME.$DOMAIN_NAME" "$PIXELFED_CLIENT_SECRET" </dev/null) |
||||
|
||||
echo '{"name":"admin"}' | kcadm.sh create -r "$REALM" "clients/$client_id/roles" -f - |
||||
|
Loading…
Reference in new issue