diff --git a/nextcloud/README.md b/nextcloud/README.md deleted file mode 100644 index 83f2a55..0000000 --- a/nextcloud/README.md +++ /dev/null @@ -1,35 +0,0 @@ -Enable SSO: - -``` -( cd ../keycloak ; sudo docker-compose exec -T keycloak \ - /opt/keycloak/bin/kcadm.sh \ - create clients \ - --realm master --user admin --password admin \ - -r spacestation \ - -f - ) <&2 "$@" ; exit 1 ; } + +DIRNAME="$(dirname $0)" +cd "$DIRNAME" +[ -r env.production ] && source env.production +[ -r ../env.production ] && source ../env.production + +sudo docker-compose exec -u www-data -T nextcloud \ + ./occ app:install sociallogin \ +|| die "unable to install sociallogin app" + +sudo docker-compose exec -u www-data -T nextcloud \ + ./occ config:app:set sociallogin prevent_create_email_exists --value=1 \ +|| die "unable to config sociallogin" + +sudo docker-compose exec -u www-data -T nextcloud \ + ./occ config:app:set sociallogin update_profile_on_login --value=1 \ +|| die "unable to config sociallogin" + +BASE="https://$KEYCLOAK_HOSTNAME/realms/$REALM/protocol/openid-connect" +SECRET="$(openssl rand -hex 20)" +PROVIDER="$(jq -c . <