last fixes before production
parent
29fd770f6d
commit
876e56f581
|
@ -1,5 +1,9 @@
|
|||
#!/bin/sh
|
||||
ssh-keygen -A
|
||||
## Only in development
|
||||
cd /admin/admin
|
||||
yarn install
|
||||
## End Only in development
|
||||
cd /admin
|
||||
python3 start.py &
|
||||
/usr/sbin/sshd -D -e -f /etc/ssh/sshd_config
|
|
@ -40,6 +40,15 @@ class Admin():
|
|||
sleep(2)
|
||||
log.warning('Moodle connected.')
|
||||
|
||||
ready=False
|
||||
while not ready:
|
||||
try:
|
||||
with open(os.path.join(app.root_path, "../moodledata/saml2/moodle."+app.config['DOMAIN']+".pem"),"r") as pem:
|
||||
ready=True
|
||||
except IOError:
|
||||
log.warning('Could not get moodle SAML2 pem certificate. Retrying...')
|
||||
sleep(2)
|
||||
|
||||
ready=False
|
||||
while not ready:
|
||||
try:
|
||||
|
@ -51,9 +60,18 @@ class Admin():
|
|||
log.warning('Nextcloud connected.')
|
||||
|
||||
self.default_setup()
|
||||
|
||||
self.internal={}
|
||||
# self.resync_data()
|
||||
|
||||
ready=False
|
||||
while not ready:
|
||||
try:
|
||||
self.resync_data()
|
||||
ready=True
|
||||
except:
|
||||
log.error('Could not connect to moodle, waiting to be online...')
|
||||
sleep(2)
|
||||
|
||||
self.external={'users':[],
|
||||
'groups':[],
|
||||
'roles':[]}
|
||||
|
|
Loading…
Reference in New Issue