Skip to content

Commit

Permalink
bug fix to mautic and default php
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Jul 24, 2023
1 parent 632dc01 commit 6d3ebab
Show file tree
Hide file tree
Showing 8 changed files with 351 additions and 191 deletions.
4 changes: 2 additions & 2 deletions install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ def downoad_and_install_raindloop(self):
command = f'wget -O /usr/local/CyberCP/snappymail_cyberpanel.php https://raw.githubusercontent.com/the-djmaze/snappymail/master/integrations/cyberpanel/install.php'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)

command = f'/usr/local/lsws/lsphp74/bin/php /usr/local/CyberCP/snappymail_cyberpanel.php'
command = f'/usr/local/lsws/lsphp80/bin/php /usr/local/CyberCP/snappymail_cyberpanel.php'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)


Expand Down Expand Up @@ -1602,7 +1602,7 @@ def installLSCPD(self):

try:
os.remove("/usr/local/lscp/fcgi-bin/lsphp")
shutil.copy("/usr/local/lsws/lsphp74/bin/lsphp", "/usr/local/lscp/fcgi-bin/lsphp")
shutil.copy("/usr/local/lsws/lsphp80/bin/lsphp", "/usr/local/lscp/fcgi-bin/lsphp")
except:
pass

Expand Down
5 changes: 3 additions & 2 deletions plogical/applicationInstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ApplicationInstaller(multi.Thread):
LOCALHOST = 'localhost'
REMOTE = 0
PORT = '3306'
MauticVersion = '4.1.2'
MauticVersion = '4.4.0'
PrestaVersion = '1.7.8.3'

def __init__(self, installApp, extraArgs):
Expand Down Expand Up @@ -242,7 +242,7 @@ def installMautic(self):
command = 'cp %s %s/app/config/local.php' % (localDB, finalPath)
ProcessUtilities.executioner(command, externalApp)

command = "/usr/local/lsws/lsphp74/bin/php bin/console mautic:install http://%s -f" % (finalURL)
command = "/usr/local/lsws/lsphp80/bin/php bin/console mautic:install http://%s -f" % (finalURL)
result = ProcessUtilities.outputExecutioner(command, externalApp, None, finalPath)

if result.find('Install complete') == -1:
Expand Down Expand Up @@ -1699,6 +1699,7 @@ def wordpressInstallNew(self):
DataToPass['dkimCheck'] = 0
DataToPass['openBasedir'] = 0
DataToPass['mailDomain'] = 0
DataToPass['apacheBackend'] = self.extraArgs['apacheBackend']
UserID = self.data['adminID']

try:
Expand Down
4 changes: 2 additions & 2 deletions plogical/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def downoad_and_install_raindloop():
command = f'wget -O /usr/local/CyberCP/snappymail_cyberpanel.php https://raw.githubusercontent.com/the-djmaze/snappymail/master/integrations/cyberpanel/install.php'
Upgrade.executioner(command, 'verify certificate', 0)

command = f'/usr/local/lsws/lsphp74/bin/php /usr/local/CyberCP/snappymail_cyberpanel.php'
command = f'/usr/local/lsws/lsphp80/bin/php /usr/local/CyberCP/snappymail_cyberpanel.php'
Upgrade.executioner(command, 'verify certificate', 0)

# labsPath = '/usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs/application.ini'
Expand Down Expand Up @@ -3021,7 +3021,7 @@ def upgrade(branch):
except:
pass

command = 'cp /usr/local/lsws/lsphp74/bin/lsphp %s' % (phpPath)
command = 'cp /usr/local/lsws/lsphp80/bin/lsphp %s' % (phpPath)
Upgrade.executioner(command, 0)

try:
Expand Down
15 changes: 12 additions & 3 deletions websiteFunctions/static/websiteFunctions/websiteFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,14 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $

$scope.currentStatus = "Starting creation..";

var apacheBackend = 0;

if ($scope.apacheBackend === true) {
apacheBackend = 1;
} else {
apacheBackend = 0
}

var package = $scope.packageForWebsite;
var websiteOwner = $scope.websiteOwner;
var WPtitle = $scope.WPtitle;
Expand Down Expand Up @@ -361,6 +369,7 @@ app.controller('createWordpress', function ($scope, $http, $timeout, $compile, $
package: package,
home: home,
path: path,
apacheBackend: apacheBackend
}

var config = {
Expand Down Expand Up @@ -512,7 +521,7 @@ function DeployToProductionInitial(vall) {
var create_staging_domain_check = 0;

function create_staging_checkbox_function() {

try {

var checkBox = document.getElementById("Create_Staging_Check");
Expand All @@ -530,8 +539,8 @@ function create_staging_checkbox_function() {
document.getElementById('Website_Create_Own_Domain').style.display = "block";
create_staging_domain_check = 1;
}
}catch (e) {
} catch (e) {

}

// alert(domain_check);
Expand Down
477 changes: 298 additions & 179 deletions websiteFunctions/templates/websiteFunctions/ApacheManager.html

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions websiteFunctions/templates/websiteFunctions/WPCreate.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,25 @@ <h3 class="content-box-header">
class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div>
</div>

<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Additional Features" %}</label>
<label class="col-sm-3 control-label"></label>
<div class="col-sm-9">
<div class="checkbox">
<label>
{% if test_domain_data %}
<input ng-model="apacheBackend" type="checkbox" value="">
OpenLiteSpeed + Apache (Backend) (For Ubuntu 22 and AlmaLinux 8)
{% else %}

<input ng-model="apacheBackend" type="checkbox" value="" disabled>
OpenLiteSpeed + Apache (Backend) (For Ubuntu 22 and AlmaLinux 8) - <strong><a href="https://go.cyberpanel.net/ApacheRev">Premium Feature</a> <i class="p fa fa-external-link btn-icon"></i></strong>
{% endif %}
</label>
</div>
</div>
</div>


{# My Work #}
{# <div ng-hide="installationDetailsForm" class="form-group">#}
Expand Down
10 changes: 8 additions & 2 deletions websiteFunctions/templates/websiteFunctions/createWebsite.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,14 @@ <h3 class="content-box-header">
<div class="col-sm-9">
<div class="checkbox">
<label>
<input ng-model="apacheBackend" type="checkbox" value="">
Apache as Reverse Proxy (Beta, for Ubuntu 22 and AlmaLinux 8)
{% if test_domain_data %}
<input ng-model="apacheBackend" type="checkbox" value="">
OpenLiteSpeed + Apache (Backend) (For Ubuntu 22 and AlmaLinux 8)
{% else %}

<input ng-model="apacheBackend" type="checkbox" value="" disabled>
OpenLiteSpeed + Apache (Backend) (For Ubuntu 22 and AlmaLinux 8) - <strong><a href="https://go.cyberpanel.net/ApacheRev">Premium Feature</a> <i class="p fa fa-external-link btn-icon"></i></strong>
{% endif %}
</label>
</div>
</div>
Expand Down
8 changes: 7 additions & 1 deletion websiteFunctions/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,7 @@ def submitWorpressCreation(self, userID=None, data=None):
extraArgs['websiteOwner'] = data['websiteOwner']
extraArgs['package'] = data['package']
extraArgs['home'] = data['home']
extraArgs['apacheBackend'] = data['apacheBackend']
try:
extraArgs['path'] = data['path']
if extraArgs['path'] == '':
Expand Down Expand Up @@ -6447,7 +6448,12 @@ def ApacheManager(self, request=None, userID=None, data=None):

phps = PHPManager.findPHPVersions()

proc = httpProc(request, 'websiteFunctions/ApacheManager.html', {'domainName': self.domain, 'phps': phps})
if ACLManager.CheckForPremFeature('all'):
apachemanager = 1
else:
apachemanager = 0

proc = httpProc(request, 'websiteFunctions/ApacheManager.html', {'domainName': self.domain, 'phps': phps, 'apachemanager':apachemanager})
return proc.render()

def saveApacheConfigsToFile(self, userID=None, data=None):
Expand Down

0 comments on commit 6d3ebab

Please sign in to comment.