Skip to content

Commit

Permalink
bug fix: #1180
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Jan 13, 2024
1 parent a99c1fa commit 574fb18
Showing 1 changed file with 41 additions and 36 deletions.
77 changes: 41 additions & 36 deletions ApachController/ApacheController.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@

class ApacheController:
apacheInstallStatusPath = '/home/cyberpanel/apacheInstallStatus'
serverRootPath = '/etc/httpd'

if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
serverRootPath = '/etc/httpd'
else:
serverRootPath = '/etc/apache2'

mpmConfigs = """# Select the MPM module which should be used by uncommenting exactly
# one of the following LoadModule lines:
Expand Down Expand Up @@ -44,44 +49,44 @@ class ApacheController:
def checkIfApacheInstalled():
try:
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
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
# else:
# return 0
except BaseException as msg:
message = "%s. [%s]" % (str(msg), '[ApacheController.checkIfApacheInstalled]')
logging.CyberCPLogFileWriter.writeToFile(message)
Expand Down

0 comments on commit 574fb18

Please sign in to comment.