From 4157b93e519e79e0d99a6b84fedea54216f27f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu> Date: Fri, 16 Feb 2018 09:00:10 +0100 Subject: [PATCH] Changed startup check script. --- .../check_services.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/5.MediaServer/2.Startup_check_script_for_NFS/check_services.py b/5.MediaServer/2.Startup_check_script_for_NFS/check_services.py index 7c888874..5a4596f5 100755 --- a/5.MediaServer/2.Startup_check_script_for_NFS/check_services.py +++ b/5.MediaServer/2.Startup_check_script_for_NFS/check_services.py @@ -10,6 +10,7 @@ import imp import os import socket import sys +import time if __name__ == '__main__': @@ -19,9 +20,16 @@ if __name__ == '__main__': print('/home is not a mount point.') sys.exit(0) 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: + time.sleep(60) os.system('mount -a') - ec = os.system('mount | grep /home') + ec = os.system('mount | grep /home') if ec != 0: # Mounting has failed, send a email to warn admins if os.path.exists('/etc/mediaserver/msconf.py'): @@ -37,6 +45,6 @@ if __name__ == '__main__': fail_silently=True ) else: - os.system('mscontroller.py start') - os.system('msmonitor-website.sh start') - os.system('/etc/init.d/campus-manager start') + os.system('service mediaserver restart') + os.system('service msmonitor restart') + os.system('service campus-manager restart') -- GitLab