-
Notifications
You must be signed in to change notification settings - Fork 1
/
entrypoint.sh
24 lines (18 loc) · 1.07 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
set -o errexit # Bail out on all errors immediately
echo ""
echo "Applying customizations for Up2U..."
### 1. Put in place the Up2U logo
echo " .Logo ..."
mv /srv/jupyterhub/logo/logo_swan_cloudhisto.png /srv/jupyterhub/logo/logo_swan_cloudhisto.png.original
cp up2u_logo.png /srv/jupyterhub/logo/logo_swan_cloudhisto.png
### 2. Set Up2U Single Sign-On paramters
# NOTE: Please select 'shibboleth' as authentication method ('AUTH_TYPE') for jupyterhub Docker image v0.6 and later
echo " .SSO Configuration..."
cp sso_config/attribute-map.xml /etc/shibboleth/attribute-map.xml
sed "s/%%%HOSTNAME%%%/${HOSTNAME}/" sso_config/shibboleth2.xml.template > sso_config/shibboleth2.xml
cp sso_config/shibboleth2.xml /etc/shibboleth/shibboleth2.xml
sed -i "s/%%%SHIBBOLETH_AUTHENTICATOR_CLASS%%%/ssotoldap_authenticator.ssotoldap_user_auth.SSOUserAuthenticator/" /srv/jupyterhub/jupyterhub_config.py
###sed -i "s/%%%SHIBBOLETH_AUTHENTICATOR_CLASS%%%/ssoremoteuser_authenticator.sso_remote_user_auth.RemoteUserAuthenticator/" /srv/jupyterhub/jupyterhub_config.py
echo "Done"
echo ""