1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

add a script to fix firseuseauthenticator change-password function

This commit is contained in:
George Hunt 2021-08-29 22:33:48 +01:00
parent 162fad1e3a
commit dce0b075d3
2 changed files with 21 additions and 0 deletions

View file

@ -60,6 +60,16 @@
src: jupyterhub.service
dest: /etc/systemd/system/
- name: Fix the async bug in firseuseauthenticator
template:
src: patch_await.sh
dest: "{{ jupyterhub_venv }}/bin/patch_await.sh"
mode: 0755
- name: Now run the installed script
ansible.builtin.shell:
cmd: "{{ jupyterhub_venv }}/bin/patch_await.sh"
# RECORD JupyterHub AS INSTALLED

View file

@ -0,0 +1,11 @@
#!/bin/bash -x
# add await to asyncio change password function
cat /opt/iiab/jupyterhub/lib/python3.7/site-packages/firstuseauthenticator/firstuseauthenticator.py |grep 'await self.render'
if [ $? -ne 0 ];then
echo Updating file
sed -i -e's/self.render/await self.render/' /opt/iiab/jupyterhub/lib/python3.7/site-packages/firstuseauthenticator/firstuseauthenticator.py
else
echo Patch already applied. Skipping. . .
fi