mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
This commit is contained in:
@@ -9,7 +9,12 @@ from plogical.processUtilities import ProcessUtilities
|
|||||||
|
|
||||||
class ApacheController:
|
class ApacheController:
|
||||||
apacheInstallStatusPath = '/home/cyberpanel/apacheInstallStatus'
|
apacheInstallStatusPath = '/home/cyberpanel/apacheInstallStatus'
|
||||||
|
|
||||||
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
serverRootPath = '/etc/httpd'
|
serverRootPath = '/etc/httpd'
|
||||||
|
else:
|
||||||
|
serverRootPath = '/etc/apache2'
|
||||||
|
|
||||||
mpmConfigs = """# Select the MPM module which should be used by uncommenting exactly
|
mpmConfigs = """# Select the MPM module which should be used by uncommenting exactly
|
||||||
# one of the following LoadModule lines:
|
# one of the following LoadModule lines:
|
||||||
|
|
||||||
@@ -44,44 +49,44 @@ LoadModule mpm_event_module modules/mod_mpm_event.so
|
|||||||
def checkIfApacheInstalled():
|
def checkIfApacheInstalled():
|
||||||
try:
|
try:
|
||||||
if os.path.exists(ApacheController.serverRootPath):
|
if os.path.exists(ApacheController.serverRootPath):
|
||||||
pass
|
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if os.path.exists(ApacheVhost.php54Path):
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if os.path.exists(ApacheVhost.php55Path):
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if os.path.exists(ApacheVhost.php56Path):
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if os.path.exists(ApacheVhost.php70Path):
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if os.path.exists(ApacheVhost.php71Path):
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if os.path.exists(ApacheVhost.php72Path):
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if os.path.exists(ApacheVhost.php73Path):
|
|
||||||
return 1
|
return 1
|
||||||
else:
|
else:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
# if os.path.exists(ApacheVhost.php54Path):
|
||||||
|
# pass
|
||||||
|
# else:
|
||||||
|
# return 0
|
||||||
|
#
|
||||||
|
# if os.path.exists(ApacheVhost.php55Path):
|
||||||
|
# pass
|
||||||
|
# else:
|
||||||
|
# return 0
|
||||||
|
#
|
||||||
|
# if os.path.exists(ApacheVhost.php56Path):
|
||||||
|
# pass
|
||||||
|
# else:
|
||||||
|
# return 0
|
||||||
|
#
|
||||||
|
# if os.path.exists(ApacheVhost.php70Path):
|
||||||
|
# pass
|
||||||
|
# else:
|
||||||
|
# return 0
|
||||||
|
#
|
||||||
|
# if os.path.exists(ApacheVhost.php71Path):
|
||||||
|
# pass
|
||||||
|
# else:
|
||||||
|
# return 0
|
||||||
|
#
|
||||||
|
# if os.path.exists(ApacheVhost.php72Path):
|
||||||
|
# pass
|
||||||
|
# else:
|
||||||
|
# return 0
|
||||||
|
#
|
||||||
|
# if os.path.exists(ApacheVhost.php73Path):
|
||||||
|
# return 1
|
||||||
|
# else:
|
||||||
|
# return 0
|
||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
message = "%s. [%s]" % (str(msg), '[ApacheController.checkIfApacheInstalled]')
|
message = "%s. [%s]" % (str(msg), '[ApacheController.checkIfApacheInstalled]')
|
||||||
logging.CyberCPLogFileWriter.writeToFile(message)
|
logging.CyberCPLogFileWriter.writeToFile(message)
|
||||||
|
|||||||
Reference in New Issue
Block a user