submit proper site name for joomla installer

This commit is contained in:
Usman Nasir
2020-10-08 22:08:42 +05:00
5 changed files with 21 additions and 3 deletions

View File

@@ -831,6 +831,8 @@ $parameters = array(
password = self.extraArgs['password']
prefix = self.extraArgs['prefix']
home = self.extraArgs['home']
siteName = self.extraArgs['siteName']
tempStatusPath = self.extraArgs['tempStatusPath']
self.tempStatusPath = tempStatusPath
@@ -951,7 +953,6 @@ $parameters = array(
statusFile.writelines('Installing LiteSpeed Cache Joomla plugin..,80')
statusFile.close()
command = 'wget https://raw.githubusercontent.com/litespeedtech/lscache-joomla/master/package/lscache-1.3.1.zip -O /usr/local/CyberCP/joomla.zip'
ProcessUtilities.executioner(command)
@@ -965,6 +966,7 @@ $parameters = array(
ProcessUtilities.executioner(command)
command = '/home/%s/.composer/vendor/bin/joomla extension:enable %s --www %s lscache' % (self.masterDomain, dbUser, finalPath)
ProcessUtilities.executioner(command)
command = 'mv %s%s/* %s' % (finalPath, dbUser, finalPath)
@@ -983,6 +985,11 @@ $parameters = array(
fm = FileManager(None, None)
fm.fixPermissions(self.masterDomain)
command = "sed -i \"s|sitename = '%s'|sitename = '%s'|g\" %sconfiguration.php" % (
dbUser, siteName, finalPath)
ProcessUtilities.executioner(command, externalApp)
installUtilities.reStartLiteSpeedSocket()
statusFile = open(tempStatusPath, 'w')

View File

@@ -1739,6 +1739,7 @@ app.controller('websitePages', function ($scope, $http, $timeout, $window) {
var data = {
domain: domain,
siteName: $scope.siteName,
home: home,
path: path,
password: password,
@@ -4672,7 +4673,7 @@ app.controller('installJoomlaCTRL', function ($scope, $http, $timeout) {
domain: domain,
home: home,
path: path,
sitename: $scope.blogTitle,
siteName: $scope.siteName,
username: $scope.adminUser,
passwordByPass: $scope.adminPassword,
prefix: $scope.databasePrefix

View File

@@ -1739,6 +1739,7 @@ app.controller('websitePages', function ($scope, $http, $timeout, $window) {
var data = {
domain: domain,
siteName: $scope.siteName,
home: home,
path: path,
password: password,
@@ -4672,7 +4673,7 @@ app.controller('installJoomlaCTRL', function ($scope, $http, $timeout) {
domain: domain,
home: home,
path: path,
sitename: $scope.blogTitle,
siteName: $scope.siteName,
username: $scope.adminUser,
passwordByPass: $scope.adminPassword,
prefix: $scope.databasePrefix

View File

@@ -24,6 +24,14 @@
<form name="websiteCreationForm" action="/" id="createPackages" class="form-horizontal bordered-row">
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Site Name" %}</label>
<div class="col-sm-6">
<input type="text" class="form-control" ng-model="siteName">
</div>
</div>
<div ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label">{% trans "Login User" %}</label>
<div class="col-sm-6">

View File

@@ -1931,6 +1931,7 @@ class WebsiteManager:
extraArgs['prefix'] = data['prefix']
extraArgs['domain'] = data['domain']
extraArgs['home'] = data['home']
extraArgs['siteName'] = data['siteName']
extraArgs['tempStatusPath'] = "/home/cyberpanel/" + str(randint(1000, 9999))
mailUtilities.checkHome()