Skip to content
Snippets Groups Projects
Commit 4157b93e authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Changed startup check script.

parent 1dc50be7
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ import imp ...@@ -10,6 +10,7 @@ import imp
import os import os
import socket import socket
import sys import sys
import time
if __name__ == '__main__': if __name__ == '__main__':
...@@ -19,9 +20,16 @@ if __name__ == '__main__': ...@@ -19,9 +20,16 @@ if __name__ == '__main__':
print('/home is not a mount point.') print('/home is not a mount point.')
sys.exit(0) sys.exit(0)
ec = os.system('mount | grep /home') ec = os.system('mount | grep /home')
if ec == 0:
# /home is correctly mounted
sys.exit(0)
time.sleep(10)
os.system('mount -a')
ec = os.system('mount | grep /home')
if ec != 0: if ec != 0:
time.sleep(60)
os.system('mount -a') os.system('mount -a')
ec = os.system('mount | grep /home') ec = os.system('mount | grep /home')
if ec != 0: if ec != 0:
# Mounting has failed, send a email to warn admins # Mounting has failed, send a email to warn admins
if os.path.exists('/etc/mediaserver/msconf.py'): if os.path.exists('/etc/mediaserver/msconf.py'):
...@@ -37,6 +45,6 @@ if __name__ == '__main__': ...@@ -37,6 +45,6 @@ if __name__ == '__main__':
fail_silently=True fail_silently=True
) )
else: else:
os.system('mscontroller.py start') os.system('service mediaserver restart')
os.system('msmonitor-website.sh start') os.system('service msmonitor restart')
os.system('/etc/init.d/campus-manager start') os.system('service campus-manager restart')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment