Add Nginx configuration Rollback

This commit is contained in:
VirtuBox
2019-08-27 15:12:01 +02:00
parent 5cc1c06e88
commit d24ae7e8d2
7 changed files with 199 additions and 162 deletions

View File

@@ -27,7 +27,7 @@ class WOService():
"[" + Log.ENDC + "OK" + Log.OKBLUE + "]")
return True
else:
Log.error(
Log.info(
self, "Starting Nginx " + "[" + Log.FAIL +
"Failed" + Log.OKBLUE+"]")
return False
@@ -88,13 +88,13 @@ class WOService():
"[" + Log.ENDC + "OK" + Log.OKBLUE + "]")
return True
else:
Log.error(
self, "Restarting Nginx " + "[" + Log.FAIL +
"Failed" + Log.OKBLUE+"]")
Log.info(self, "Restarting Nginx " + "[" + Log.FAIL +
"Failed" + Log.OKBLUE+"]")
return False
else:
service_cmd = ('service {0} restart'.format(service_name))
Log.info(self, "Restart : {0:10}".format(service_name), end='')
Log.info(self, "Restart : {0:10}".format(
service_name), end='')
retcode = subprocess.getstatusoutput(service_cmd)
if retcode[0] == 0:
Log.info(self, "[" + Log.ENDC + "OK" + Log.OKBLUE + "]")