mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
internal bug fix for ubuntu
This commit is contained in:
@@ -187,7 +187,6 @@ class emailMarketing(multi.Thread):
|
|||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
import re
|
import re
|
||||||
|
|
||||||
message = MIMEMultipart('alternative')
|
|
||||||
tempPath = "/home/cyberpanel/" + str(randint(1000, 9999))
|
tempPath = "/home/cyberpanel/" + str(randint(1000, 9999))
|
||||||
|
|
||||||
for items in allEmails:
|
for items in allEmails:
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
|
|
||||||
if (response.data.fetchStatus === 1) {
|
if (response.data.fetchStatus === 1) {
|
||||||
|
|
||||||
|
|
||||||
/// node prepration
|
/// node prepration
|
||||||
|
|
||||||
var ulNode = prepareChildNodeUL();
|
var ulNode = prepareChildNodeUL();
|
||||||
@@ -129,7 +128,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
var attachFunc = function(){ $scope.fetchChilds(aNode, completePath,"secondary"); };
|
var attachFunc = function () {
|
||||||
|
$scope.fetchChilds(aNode, completePath, "secondary");
|
||||||
|
};
|
||||||
|
|
||||||
var aNode = document.createElement('a');
|
var aNode = document.createElement('a');
|
||||||
aNode.setAttribute('href', '#');
|
aNode.setAttribute('href', '#');
|
||||||
@@ -167,7 +168,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
if (dropDown == true) {
|
if (dropDown == true) {
|
||||||
secondANode.appendChild(iNodeFolder);
|
secondANode.appendChild(iNodeFolder);
|
||||||
secondANode.appendChild(pathNode);
|
secondANode.appendChild(pathNode);
|
||||||
secondANode.addEventListener("click", function(){ $scope.fetchForTableSecondary(secondANode,"fromTree",completePath);});
|
secondANode.addEventListener("click", function () {
|
||||||
|
$scope.fetchForTableSecondary(secondANode, "fromTree", completePath);
|
||||||
|
});
|
||||||
|
|
||||||
// This makes completion of <a href="#"><i class="fa fa-folder" aria-hidden="true"></i> {{ startingPath }} </a>
|
// This makes completion of <a href="#"><i class="fa fa-folder" aria-hidden="true"></i> {{ startingPath }} </a>
|
||||||
|
|
||||||
@@ -208,7 +211,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
|
|
||||||
var aNode = document.createElement('a');
|
var aNode = document.createElement('a');
|
||||||
aNode.setAttribute('href', '#');
|
aNode.setAttribute('href', '#');
|
||||||
aNode.addEventListener("click", function(){ deleteChilds(aNode,completePath);});
|
aNode.addEventListener("click", function () {
|
||||||
|
deleteChilds(aNode, completePath);
|
||||||
|
});
|
||||||
aNode.setAttribute('onclick', 'return false;');
|
aNode.setAttribute('onclick', 'return false;');
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -244,7 +249,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
|
|
||||||
var newANode = document.createElement('a');
|
var newANode = document.createElement('a');
|
||||||
newANode.setAttribute('href', '#');
|
newANode.setAttribute('href', '#');
|
||||||
newANode.addEventListener("click", function(){ $scope.fetchChilds(newANode, completePath,"secondary");});
|
newANode.addEventListener("click", function () {
|
||||||
|
$scope.fetchChilds(newANode, completePath, "secondary");
|
||||||
|
});
|
||||||
newANode.setAttribute('onclick', 'return false;');
|
newANode.setAttribute('onclick', 'return false;');
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -366,8 +373,6 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
var permissionsNode = document.createTextNode(permissions);
|
var permissionsNode = document.createTextNode(permissions);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@@ -411,9 +416,15 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
if (dirCheck == true) {
|
if (dirCheck == true) {
|
||||||
thNode.appendChild(iNodeFolder);
|
thNode.appendChild(iNodeFolder);
|
||||||
trNode.appendChild(thNode);
|
trNode.appendChild(thNode);
|
||||||
trNode.addEventListener("dblclick", function(){ $scope.fetchForTableSecondary(firstTDNode,"doubleClick");});
|
trNode.addEventListener("dblclick", function () {
|
||||||
trNode.addEventListener("click", function(){ addFileOrFolderToList(trNode);});
|
$scope.fetchForTableSecondary(firstTDNode, "doubleClick");
|
||||||
trNode.addEventListener("contextmenu", function(event){$scope.rightClickCallBack(event,trNode);});
|
});
|
||||||
|
trNode.addEventListener("click", function () {
|
||||||
|
addFileOrFolderToList(trNode);
|
||||||
|
});
|
||||||
|
trNode.addEventListener("contextmenu", function (event) {
|
||||||
|
$scope.rightClickCallBack(event, trNode);
|
||||||
|
});
|
||||||
|
|
||||||
// Hidden td to represent file or folder
|
// Hidden td to represent file or folder
|
||||||
|
|
||||||
@@ -423,8 +434,12 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
else {
|
else {
|
||||||
thNode.appendChild(iNodeFile);
|
thNode.appendChild(iNodeFile);
|
||||||
trNode.appendChild(thNode);
|
trNode.appendChild(thNode);
|
||||||
trNode.addEventListener("click", function(){ addFileOrFolderToList(trNode);});
|
trNode.addEventListener("click", function () {
|
||||||
trNode.addEventListener("contextmenu", function(event){ $scope.rightClickCallBack(event,trNode); });
|
addFileOrFolderToList(trNode);
|
||||||
|
});
|
||||||
|
trNode.addEventListener("contextmenu", function (event) {
|
||||||
|
$scope.rightClickCallBack(event, trNode);
|
||||||
|
});
|
||||||
|
|
||||||
// Hidden td to represent file or folder
|
// Hidden td to represent file or folder
|
||||||
|
|
||||||
@@ -595,15 +610,12 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
$scope.buttonActivator();
|
$scope.buttonActivator();
|
||||||
|
|
||||||
// table functions
|
// table functions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.fetchForTableSecondary = function (node, functionName) {
|
$scope.fetchForTableSecondary = function (node, functionName) {
|
||||||
|
|
||||||
allFilesAndFolders = [];
|
allFilesAndFolders = [];
|
||||||
@@ -628,8 +640,7 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
completePathToFile = $scope.currentPath;
|
completePathToFile = $scope.currentPath;
|
||||||
var rightClickNode = document.getElementById("rightClick");
|
var rightClickNode = document.getElementById("rightClick");
|
||||||
}
|
}
|
||||||
else if(functionName === "fromTree")
|
else if (functionName === "fromTree") {
|
||||||
{
|
|
||||||
completePathToFile = arguments[2];
|
completePathToFile = arguments[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -685,7 +696,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var notification = alertify.notify(response.data.error_message, 'error', 10, function(){ console.log('dismissed'); });
|
var notification = alertify.notify(response.data.error_message, 'error', 10, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
$scope.fetchForTableSecondary(null, 'homeFetch');
|
$scope.fetchForTableSecondary(null, 'homeFetch');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -721,26 +734,25 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
domainRandomSeed = response.data.domainRandomSeed;
|
domainRandomSeed = response.data.domainRandomSeed;
|
||||||
$scope.fetchForTableSecondary(null, "startPoint");
|
$scope.fetchForTableSecondary(null, "startPoint");
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
var notification = alertify.notify(response.data.error_message, 'error', 10, function () {
|
||||||
var notification = alertify.notify(response.data.error_message, 'error', 10, function(){ console.log('dismissed'); });
|
console.log('dismissed');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
var notification = alertify.notify("Could not connec to server, refresh page.", 'error', 10, function(){ console.log('dismissed'); });
|
var notification = alertify.notify("Could not connec to server, refresh page.", 'error', 10, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createEntryPoint();
|
createEntryPoint();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// html editor
|
// html editor
|
||||||
|
|
||||||
$scope.getFileContents = function () {
|
$scope.getFileContents = function () {
|
||||||
@@ -776,6 +788,7 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -814,6 +827,7 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -881,7 +895,6 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
folderName: completePathForFolder,
|
folderName: completePathForFolder,
|
||||||
method: "createNewFolder",
|
method: "createNewFolder",
|
||||||
@@ -905,6 +918,7 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -956,6 +970,7 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -991,14 +1006,19 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
$scope.deleteLoading = true;
|
$scope.deleteLoading = true;
|
||||||
if (response.data.deleteStatus === 1) {
|
if (response.data.deleteStatus === 1) {
|
||||||
$('#showDelete').modal('hide');
|
$('#showDelete').modal('hide');
|
||||||
var notification = alertify.notify('Successfully Deleted!', 'success', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify('Successfully Deleted!', 'success', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
$scope.fetchForTableSecondary(null, 'refresh');
|
$scope.fetchForTableSecondary(null, 'refresh');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var notification = alertify.notify('Files/Folders can not be deleted', 'error', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify('Files/Folders can not be deleted', 'error', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1043,14 +1063,19 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
$scope.compressionLoading = true;
|
$scope.compressionLoading = true;
|
||||||
$('#showCompression').modal('hide');
|
$('#showCompression').modal('hide');
|
||||||
if (response.data.compressed === 1) {
|
if (response.data.compressed === 1) {
|
||||||
var notification = alertify.notify('Successfully Compressed!', 'success', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify('Successfully Compressed!', 'success', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
$scope.fetchForTableSecondary(null, 'refresh');
|
$scope.fetchForTableSecondary(null, 'refresh');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var notification = alertify.notify(response.data.error_message, 'error', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify(response.data.error_message, 'error', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1101,14 +1126,19 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
$('#showExtraction').modal('hide');
|
$('#showExtraction').modal('hide');
|
||||||
|
|
||||||
if (response.data.extracted === 1) {
|
if (response.data.extracted === 1) {
|
||||||
var notification = alertify.notify('Successfully Extracted!', 'success', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify('Successfully Extracted!', 'success', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
$scope.fetchForTableSecondary(null, 'refresh');
|
$scope.fetchForTableSecondary(null, 'refresh');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var notification = alertify.notify(response.data.error_message, 'error', 10, function(){ console.log('dismissed'); });
|
var notification = alertify.notify(response.data.error_message, 'error', 10, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1155,14 +1185,19 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
$('#showMove').modal('hide');
|
$('#showMove').modal('hide');
|
||||||
|
|
||||||
if (response.data.moved === 1) {
|
if (response.data.moved === 1) {
|
||||||
var notification = alertify.notify('Successfully Moved!', 'success', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify('Successfully Moved!', 'success', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
$scope.fetchForTableSecondary(null, 'refresh');
|
$scope.fetchForTableSecondary(null, 'refresh');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var notification = alertify.notify(response.data.error_message, 'error', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify(response.data.error_message, 'error', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1208,14 +1243,19 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
$('#showCopy').modal('hide');
|
$('#showCopy').modal('hide');
|
||||||
|
|
||||||
if (response.data.copied === 1) {
|
if (response.data.copied === 1) {
|
||||||
var notification = alertify.notify('Successfully Copied!', 'success', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify('Successfully Copied!', 'success', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
$scope.fetchForTableSecondary(null, 'refresh');
|
$scope.fetchForTableSecondary(null, 'refresh');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var notification = alertify.notify(response.data.error_message, 'error', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify(response.data.error_message, 'error', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1249,8 +1289,6 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.addFileOrFolderToListForRightClick(trNode);
|
$scope.addFileOrFolderToListForRightClick(trNode);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1329,14 +1367,19 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
$scope.renameLoading = true;
|
$scope.renameLoading = true;
|
||||||
|
|
||||||
if (response.data.renamed === 1) {
|
if (response.data.renamed === 1) {
|
||||||
var notification = alertify.notify('Successfully Renamed!', 'success', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify('Successfully Renamed!', 'success', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
$scope.fetchForTableSecondary(null, 'refresh');
|
$scope.fetchForTableSecondary(null, 'refresh');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var notification = alertify.notify(response.data.error_message, 'error', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify(response.data.error_message, 'error', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1363,11 +1406,15 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
|
|
||||||
|
|
||||||
if (response.data.permissionsChanged === 1) {
|
if (response.data.permissionsChanged === 1) {
|
||||||
var notification = alertify.notify('Permissions successfully fixed!', 'success', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify('Permissions successfully fixed!', 'success', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
$scope.fetchForTableSecondary(null, 'refresh');
|
$scope.fetchForTableSecondary(null, 'refresh');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var notification = alertify.notify(response.data.error_message, 'error', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify(response.data.error_message, 'error', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
$scope.fetchForTableSecondary(null, 'refresh');
|
$scope.fetchForTableSecondary(null, 'refresh');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1404,19 +1451,16 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.updateReadPermissions = function (value) {
|
$scope.updateReadPermissions = function (value) {
|
||||||
|
|
||||||
switch (value) {
|
switch (value) {
|
||||||
|
|
||||||
case 'userRead':
|
case 'userRead':
|
||||||
|
|
||||||
if($scope.userRead === true)
|
if ($scope.userRead === true) {
|
||||||
{
|
|
||||||
$scope.userPermissions = $scope.userPermissions + 4;
|
$scope.userPermissions = $scope.userPermissions + 4;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
if ($scope.userRead !== undefined) {
|
if ($scope.userRead !== undefined) {
|
||||||
$scope.userPermissions = $scope.userPermissions - 4;
|
$scope.userPermissions = $scope.userPermissions - 4;
|
||||||
}
|
}
|
||||||
@@ -1453,12 +1497,10 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
|
|
||||||
case 'userWrite':
|
case 'userWrite':
|
||||||
|
|
||||||
if($scope.userWrite === true)
|
if ($scope.userWrite === true) {
|
||||||
{
|
|
||||||
$scope.userPermissions = $scope.userPermissions + 2;
|
$scope.userPermissions = $scope.userPermissions + 2;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
if ($scope.userWrite !== undefined) {
|
if ($scope.userWrite !== undefined) {
|
||||||
$scope.userPermissions = $scope.userPermissions - 2;
|
$scope.userPermissions = $scope.userPermissions - 2;
|
||||||
}
|
}
|
||||||
@@ -1495,12 +1537,10 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
|
|
||||||
case 'userExecute':
|
case 'userExecute':
|
||||||
|
|
||||||
if($scope.userExecute === true)
|
if ($scope.userExecute === true) {
|
||||||
{
|
|
||||||
$scope.userPermissions = $scope.userPermissions + 1;
|
$scope.userPermissions = $scope.userPermissions + 1;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
if ($scope.userExecute !== undefined) {
|
if ($scope.userExecute !== undefined) {
|
||||||
$scope.userPermissions = $scope.userPermissions - 1;
|
$scope.userPermissions = $scope.userPermissions - 1;
|
||||||
}
|
}
|
||||||
@@ -1561,23 +1601,25 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader, $w
|
|||||||
$('#showPermissions').modal('hide');
|
$('#showPermissions').modal('hide');
|
||||||
|
|
||||||
if (response.data.permissionsChanged === 1) {
|
if (response.data.permissionsChanged === 1) {
|
||||||
var notification = alertify.notify('Permissions Successfully Changed!', 'success', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify('Permissions Successfully Changed!', 'success', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
$scope.fetchForTableSecondary(null, 'refresh');
|
$scope.fetchForTableSecondary(null, 'refresh');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var notification = alertify.notify(response.data.error_message, 'error', 5, function(){ console.log('dismissed'); });
|
var notification = alertify.notify(response.data.error_message, 'error', 5, function () {
|
||||||
|
console.log('dismissed');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -904,6 +904,7 @@ class preFlightsChecks:
|
|||||||
else:
|
else:
|
||||||
writeDataToFile.writelines(items)
|
writeDataToFile.writelines(items)
|
||||||
|
|
||||||
|
if self.distro == ubuntu:
|
||||||
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
||||||
|
|
||||||
writeDataToFile.close()
|
writeDataToFile.close()
|
||||||
@@ -1330,6 +1331,7 @@ class preFlightsChecks:
|
|||||||
else:
|
else:
|
||||||
writeDataToFile.writelines(items)
|
writeDataToFile.writelines(items)
|
||||||
|
|
||||||
|
if self.distro == ubuntu:
|
||||||
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
||||||
|
|
||||||
writeDataToFile.close()
|
writeDataToFile.close()
|
||||||
@@ -1348,6 +1350,7 @@ class preFlightsChecks:
|
|||||||
else:
|
else:
|
||||||
writeDataToFile.writelines(items)
|
writeDataToFile.writelines(items)
|
||||||
|
|
||||||
|
if self.distro == ubuntu:
|
||||||
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
||||||
|
|
||||||
writeDataToFile.close()
|
writeDataToFile.close()
|
||||||
@@ -1365,7 +1368,7 @@ class preFlightsChecks:
|
|||||||
writeDataToFile.writelines(dataWritten)
|
writeDataToFile.writelines(dataWritten)
|
||||||
else:
|
else:
|
||||||
writeDataToFile.writelines(items)
|
writeDataToFile.writelines(items)
|
||||||
|
if self.distro == ubuntu:
|
||||||
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
||||||
|
|
||||||
writeDataToFile.close()
|
writeDataToFile.close()
|
||||||
@@ -1384,6 +1387,7 @@ class preFlightsChecks:
|
|||||||
else:
|
else:
|
||||||
writeDataToFile.writelines(items)
|
writeDataToFile.writelines(items)
|
||||||
|
|
||||||
|
if self.distro == ubuntu:
|
||||||
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
||||||
|
|
||||||
writeDataToFile.close()
|
writeDataToFile.close()
|
||||||
@@ -1401,7 +1405,7 @@ class preFlightsChecks:
|
|||||||
writeDataToFile.writelines(dataWritten)
|
writeDataToFile.writelines(dataWritten)
|
||||||
else:
|
else:
|
||||||
writeDataToFile.writelines(items)
|
writeDataToFile.writelines(items)
|
||||||
|
if self.distro == ubuntu:
|
||||||
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
||||||
|
|
||||||
writeDataToFile.close()
|
writeDataToFile.close()
|
||||||
@@ -1476,7 +1480,6 @@ class preFlightsChecks:
|
|||||||
os.remove(davecotmysql)
|
os.remove(davecotmysql)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###############Getting SSL
|
###############Getting SSL
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|||||||
@@ -947,9 +947,11 @@ class InstallCyberPanel:
|
|||||||
else:
|
else:
|
||||||
writeDataToFile.writelines(items)
|
writeDataToFile.writelines(items)
|
||||||
|
|
||||||
|
if self.distro == ubuntu:
|
||||||
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
||||||
writeDataToFile.close()
|
writeDataToFile.close()
|
||||||
|
|
||||||
|
if self.distro == ubuntu:
|
||||||
os.chmod(ftpdPath + '/pureftpd-ldap.conf', stat.S_IRUSR | stat.S_IWUSR)
|
os.chmod(ftpdPath + '/pureftpd-ldap.conf', stat.S_IRUSR | stat.S_IWUSR)
|
||||||
os.chmod(ftpdPath + '/pureftpd-pgsql.conf', stat.S_IRUSR | stat.S_IWUSR)
|
os.chmod(ftpdPath + '/pureftpd-pgsql.conf', stat.S_IRUSR | stat.S_IWUSR)
|
||||||
|
|
||||||
@@ -1125,7 +1127,7 @@ class InstallCyberPanel:
|
|||||||
writeDataToFile.writelines(dataWritten)
|
writeDataToFile.writelines(dataWritten)
|
||||||
else:
|
else:
|
||||||
writeDataToFile.writelines(items)
|
writeDataToFile.writelines(items)
|
||||||
|
if self.distro == ubuntu:
|
||||||
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
||||||
|
|
||||||
writeDataToFile.close()
|
writeDataToFile.close()
|
||||||
|
|||||||
263
managePHP/php70.xml
Normal file
263
managePHP/php70.xml
Normal file
@@ -0,0 +1,263 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<php>
|
||||||
|
<name>php70</name>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-debuginfo</extensionName>
|
||||||
|
<extensionDescription>Debug information for package lsphp70</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-igbinary-debuginfo</extensionName>
|
||||||
|
<extensionDescription>Debug information for package lsphp70-pecl-igbinary</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-mcrypt-debuginfo</extensionName>
|
||||||
|
<extensionDescription>LSPHP70 lsphp70-pecl-mcrypt-debuginfo Extension</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-bcmath</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications for using the bcmath library.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-common</extensionName>
|
||||||
|
<extensionDescription>Common files for PHP.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-dba</extensionName>
|
||||||
|
<extensionDescription>A database abstraction layer extension for PHP applications.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-devel</extensionName>
|
||||||
|
<extensionDescription>Files needed for building PHP extensions.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-enchant</extensionName>
|
||||||
|
<extensionDescription>Enchant spelling extension for PHP applications.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-gd</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications for using the gd graphics library.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-gmp</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications for using the GNU MP library.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-imap</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that use IMAP.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-intl</extensionName>
|
||||||
|
<extensionDescription>Internationalization extension for PHP applications.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-json</extensionName>
|
||||||
|
<extensionDescription>LSPHP70 Json PHP Extension</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-ldap</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that use LDAP.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-mbstring</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications which need multi-byte string handling.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-mysqlnd</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that use MySQL databases.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-odbc</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that use ODBC databases.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-opcache</extensionName>
|
||||||
|
<extensionDescription>The Zend OPcache.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pdo</extensionName>
|
||||||
|
<extensionDescription>A database access abstraction extension for PHP applications.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pear</extensionName>
|
||||||
|
<extensionDescription>PHP Extension and Application Repository framework.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-apcu</extensionName>
|
||||||
|
<extensionDescription>APC User Cache.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-apcu-devel</extensionName>
|
||||||
|
<extensionDescription>APCu developer files (header).</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-apcu-panel</extensionName>
|
||||||
|
<extensionDescription>APCu control panel.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-igbinary</extensionName>
|
||||||
|
<extensionDescription>Replacement for the standard PHP serializer.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-igbinary-devel</extensionName>
|
||||||
|
<extensionDescription>Igbinary developer files (header).</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-mcrypt</extensionName>
|
||||||
|
<extensionDescription>LSPHP70 lsphp70-pecl-mcrypt Extension.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-memcache</extensionName>
|
||||||
|
<extensionDescription>Extension to work with the Memcached caching daemon.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-memcached</extensionName>
|
||||||
|
<extensionDescription>Extension to work with the Memcached caching daemon.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-msgpack</extensionName>
|
||||||
|
<extensionDescription>API for communicating with MessagePack serialization.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-msgpack-devel</extensionName>
|
||||||
|
<extensionDescription>MessagePack developer files (header).</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pecl-redis</extensionName>
|
||||||
|
<extensionDescription>Extension for communicating with the Redis key-value store.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pgsql</extensionName>
|
||||||
|
<extensionDescription>A PostgreSQL database extension for PHP.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-process</extensionName>
|
||||||
|
<extensionDescription>extensions for PHP script using system process interfaces.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-pspell</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications for using pspell interfaces.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-recode</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications for using the recode library.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-snmp</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that query SNMP-managed devices.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-soap</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that use the SOAP protocol.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-tidy</extensionName>
|
||||||
|
<extensionDescription>Standard PHP extension provides tidy library support.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-xml</extensionName>
|
||||||
|
<extensionDescription>Standard PHP extension provides tidy library support.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-xmlrpc</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications which use the XML-RPC protocol.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-zip</extensionName>
|
||||||
|
<extensionDescription>LSPHP70 Json PHP Extension</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-mcrypt</extensionName>
|
||||||
|
<extensionDescription>Standard PHP extension provides mcrypt library support.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp70-dbg</extensionName>
|
||||||
|
<extensionDescription>php70-dbg lsphp70-package</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
</php>
|
||||||
263
managePHP/php71.xml
Normal file
263
managePHP/php71.xml
Normal file
@@ -0,0 +1,263 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<php>
|
||||||
|
<name>php71</name>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-debuginfo</extensionName>
|
||||||
|
<extensionDescription>Debug information for package lsphp71</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-igbinary-debuginfo</extensionName>
|
||||||
|
<extensionDescription>Debug information for package lsphp71-pecl-igbinary</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-mcrypt-debuginfo</extensionName>
|
||||||
|
<extensionDescription>LSPHP71 lsphp71-pecl-mcrypt-debuginfo Extension</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-bcmath</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications for using the bcmath library.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-common</extensionName>
|
||||||
|
<extensionDescription>Common files for PHP.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-dba</extensionName>
|
||||||
|
<extensionDescription>A database abstraction layer extension for PHP applications.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-devel</extensionName>
|
||||||
|
<extensionDescription>Files needed for building PHP extensions.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-enchant</extensionName>
|
||||||
|
<extensionDescription>Enchant spelling extension for PHP applications.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-gd</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications for using the gd graphics library.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-gmp</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications for using the GNU MP library.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-imap</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that use IMAP.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-intl</extensionName>
|
||||||
|
<extensionDescription>Internationalization extension for PHP applications.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-json</extensionName>
|
||||||
|
<extensionDescription>LSPHP71 Json PHP Extension</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-ldap</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that use LDAP.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-mbstring</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications which need multi-byte string handling.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-mysqlnd</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that use MySQL databases.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-odbc</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that use ODBC databases.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-opcache</extensionName>
|
||||||
|
<extensionDescription>The Zend OPcache.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pdo</extensionName>
|
||||||
|
<extensionDescription>A database access abstraction extension for PHP applications.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pear</extensionName>
|
||||||
|
<extensionDescription>PHP Extension and Application Repository framework.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-apcu</extensionName>
|
||||||
|
<extensionDescription>APC User Cache.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-apcu-devel</extensionName>
|
||||||
|
<extensionDescription>APCu developer files (header).</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-apcu-panel</extensionName>
|
||||||
|
<extensionDescription>APCu control panel.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-igbinary</extensionName>
|
||||||
|
<extensionDescription>Replacement for the standard PHP serializer.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-igbinary-devel</extensionName>
|
||||||
|
<extensionDescription>Igbinary developer files (header).</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-mcrypt</extensionName>
|
||||||
|
<extensionDescription>LSPHP71 lsphp71-pecl-mcrypt Extension.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-memcache</extensionName>
|
||||||
|
<extensionDescription>Extension to work with the Memcached caching daemon.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-memcached</extensionName>
|
||||||
|
<extensionDescription>Extension to work with the Memcached caching daemon.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-msgpack</extensionName>
|
||||||
|
<extensionDescription>API for communicating with MessagePack serialization.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-msgpack-devel</extensionName>
|
||||||
|
<extensionDescription>MessagePack developer files (header).</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pecl-redis</extensionName>
|
||||||
|
<extensionDescription>Extension for communicating with the Redis key-value store.</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pgsql</extensionName>
|
||||||
|
<extensionDescription>A PostgreSQL database extension for PHP.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-process</extensionName>
|
||||||
|
<extensionDescription>extensions for PHP script using system process interfaces.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-pspell</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications for using pspell interfaces.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-recode</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications for using the recode library.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-snmp</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that query SNMP-managed devices.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-soap</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications that use the SOAP protocol.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-tidy</extensionName>
|
||||||
|
<extensionDescription>Standard PHP extension provides tidy library support.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-xml</extensionName>
|
||||||
|
<extensionDescription>Standard PHP extension provides tidy library support.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-xmlrpc</extensionName>
|
||||||
|
<extensionDescription>A extension for PHP applications which use the XML-RPC protocol.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-zip</extensionName>
|
||||||
|
<extensionDescription>LSPHP71 Json PHP Extension</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-mcrypt</extensionName>
|
||||||
|
<extensionDescription>Standard PHP extension provides mcrypt library support.</extensionDescription>
|
||||||
|
<status>1</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-dbg</extensionName>
|
||||||
|
<extensionDescription>php71-dbg lsphp71-package</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
</php>
|
||||||
@@ -254,4 +254,10 @@
|
|||||||
<status>1</status>
|
<status>1</status>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
|
<extension>
|
||||||
|
<extensionName>lsphp71-dbg</extensionName>
|
||||||
|
<extensionDescription>php72-dbg lsphp72-package</extensionDescription>
|
||||||
|
<status>0</status>
|
||||||
|
</extension>
|
||||||
|
|
||||||
</php>
|
</php>
|
||||||
@@ -13,13 +13,13 @@ import os
|
|||||||
from plogical.installUtilities import installUtilities
|
from plogical.installUtilities import installUtilities
|
||||||
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
||||||
import re
|
import re
|
||||||
from loginSystem.models import Administrator
|
|
||||||
from plogical.virtualHostUtilities import virtualHostUtilities
|
from plogical.virtualHostUtilities import virtualHostUtilities
|
||||||
import subprocess
|
import subprocess
|
||||||
import shlex
|
import shlex
|
||||||
from random import randint
|
from random import randint
|
||||||
from xml.etree import ElementTree
|
from xml.etree import ElementTree
|
||||||
from plogical.acl import ACLManager
|
from plogical.acl import ACLManager
|
||||||
|
from plogical.processUtilities import ProcessUtilities
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
|
||||||
|
|
||||||
@@ -1880,11 +1880,20 @@ def getRequestStatus(request):
|
|||||||
size = data['size']
|
size = data['size']
|
||||||
extensionName = data['extensionName']
|
extensionName = data['extensionName']
|
||||||
|
|
||||||
|
checkCommand = ''
|
||||||
|
|
||||||
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
||||||
|
checkCommand = 'yum list installed'
|
||||||
|
checkCommand = shlex.split(checkCommand)
|
||||||
|
else:
|
||||||
|
checkCommand = 'dpkg --list'
|
||||||
|
checkCommand = shlex.split(checkCommand)
|
||||||
|
|
||||||
requestStatus = unicode(open(phpUtilities.installLogPath, "r").read())
|
requestStatus = unicode(open(phpUtilities.installLogPath, "r").read())
|
||||||
requestStatusSize = len(requestStatus)
|
requestStatusSize = len(requestStatus)
|
||||||
|
|
||||||
if requestStatus.find("PHP Extension Installed") > -1:
|
if requestStatus.find("PHP Extension Installed") > -1:
|
||||||
if subprocess.check_output(["yum", "list", "installed"]).find(extensionName) > -1:
|
if subprocess.check_output(checkCommand).find(extensionName) > -1:
|
||||||
ext = installedPackages.objects.get(extensionName=extensionName)
|
ext = installedPackages.objects.get(extensionName=extensionName)
|
||||||
ext.status = 1
|
ext.status = 1
|
||||||
ext.save()
|
ext.save()
|
||||||
@@ -1901,7 +1910,7 @@ def getRequestStatus(request):
|
|||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
elif requestStatus.find("Can not be installed") > -1:
|
elif requestStatus.find("Can not be installed") > -1:
|
||||||
|
|
||||||
if subprocess.check_output(["yum", "list", "installed"]).find(extensionName) > -1:
|
if subprocess.check_output(checkCommand).find(extensionName) > -1:
|
||||||
ext = installedPackages.objects.get(extensionName=extensionName)
|
ext = installedPackages.objects.get(extensionName=extensionName)
|
||||||
ext.status = 1
|
ext.status = 1
|
||||||
ext.save()
|
ext.save()
|
||||||
@@ -1918,7 +1927,7 @@ def getRequestStatus(request):
|
|||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
elif requestStatus.find("Can not un-install Extension") > -1:
|
elif requestStatus.find("Can not un-install Extension") > -1:
|
||||||
|
|
||||||
if subprocess.check_output(["yum", "list", "installed"]).find(extensionName) > -1:
|
if subprocess.check_output(checkCommand).find(extensionName) > -1:
|
||||||
ext = installedPackages.objects.get(extensionName=extensionName)
|
ext = installedPackages.objects.get(extensionName=extensionName)
|
||||||
ext.status = 1
|
ext.status = 1
|
||||||
ext.save()
|
ext.save()
|
||||||
@@ -1935,7 +1944,7 @@ def getRequestStatus(request):
|
|||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
elif requestStatus.find("PHP Extension Removed") > -1:
|
elif requestStatus.find("PHP Extension Removed") > -1:
|
||||||
|
|
||||||
if subprocess.check_output(["yum", "list", "installed"]).find(extensionName) > -1:
|
if subprocess.check_output(checkCommand).find(extensionName) > -1:
|
||||||
ext = installedPackages.objects.get(extensionName=extensionName)
|
ext = installedPackages.objects.get(extensionName=extensionName)
|
||||||
ext.status = 1
|
ext.status = 1
|
||||||
ext.save()
|
ext.save()
|
||||||
|
|||||||
@@ -562,6 +562,8 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
|
|
||||||
## checking for directories/files
|
## checking for directories/files
|
||||||
|
|
||||||
|
logging.writeToFile(finalPath)
|
||||||
|
|
||||||
if self.dataLossCheck(finalPath, tempStatusPath) == 0:
|
if self.dataLossCheck(finalPath, tempStatusPath) == 0:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -573,8 +575,7 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
command = 'sudo GIT_SSH_COMMAND="ssh -i /root/.ssh/cyberpanel -o StrictHostKeyChecking=no" git clone ' \
|
command = 'sudo git clone https://' + defaultProvider +'.com/' + username + '/' + reponame + ' -b ' + branch + ' ' + finalPath
|
||||||
'--depth 1 --no-single-branch git@' + defaultProvider +'.com:' + username + '/' + reponame + '.git -b ' + branch + ' ' + finalPath
|
|
||||||
subprocess.check_output(shlex.split(command))
|
subprocess.check_output(shlex.split(command))
|
||||||
except subprocess.CalledProcessError, msg:
|
except subprocess.CalledProcessError, msg:
|
||||||
statusFile = open(tempStatusPath, 'w')
|
statusFile = open(tempStatusPath, 'w')
|
||||||
@@ -605,9 +606,7 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
|
|
||||||
|
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
|
|
||||||
os.remove('/home/cyberpanel/' + domainName + '.git')
|
os.remove('/home/cyberpanel/' + domainName + '.git')
|
||||||
|
|
||||||
statusFile = open(tempStatusPath, 'w')
|
statusFile = open(tempStatusPath, 'w')
|
||||||
statusFile.writelines(str(msg) + " [404]")
|
statusFile.writelines(str(msg) + " [404]")
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
@@ -630,14 +629,14 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
logging.writeToFile('Git is not setup for this website.')
|
logging.writeToFile('Git is not setup for this website.')
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
command = 'sudo GIT_SSH_COMMAND="ssh -i /root/.ssh/cyberpanel -o StrictHostKeyChecking=no" git -C ' + finalPath + ' pull'
|
command = 'sudo git --git-dir=' + finalPath + '.git --work-tree=' + finalPath +' pull'
|
||||||
subprocess.check_output(shlex.split(command))
|
subprocess.check_output(shlex.split(command))
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
website = Websites.objects.get(domain=domain)
|
website = Websites.objects.get(domain=domain)
|
||||||
externalApp = website.externalApp
|
externalApp = website.externalApp
|
||||||
|
|
||||||
##
|
|
||||||
|
|
||||||
command = "sudo chown -R " + externalApp + ":" + externalApp + " " + finalPath
|
command = "sudo chown -R " + externalApp + ":" + externalApp + " " + finalPath
|
||||||
cmd = shlex.split(command)
|
cmd = shlex.split(command)
|
||||||
subprocess.call(cmd)
|
subprocess.call(cmd)
|
||||||
|
|||||||
@@ -22,146 +22,6 @@ from datetime import datetime
|
|||||||
class FTPUtilities:
|
class FTPUtilities:
|
||||||
|
|
||||||
|
|
||||||
# This function will only install FTP
|
|
||||||
@staticmethod
|
|
||||||
def installProFTPD():
|
|
||||||
try:
|
|
||||||
cmd = []
|
|
||||||
|
|
||||||
|
|
||||||
cmd.append("yum")
|
|
||||||
cmd.append("-y")
|
|
||||||
cmd.append("install")
|
|
||||||
cmd.append("proftpd-mysql")
|
|
||||||
res = subprocess.call(cmd)
|
|
||||||
if res == 1:
|
|
||||||
print("###############################################")
|
|
||||||
print(" Could not install ProFTPD ")
|
|
||||||
print("###############################################")
|
|
||||||
sys.exit()
|
|
||||||
else:
|
|
||||||
print("###############################################")
|
|
||||||
print(" ProFTPD Installed ")
|
|
||||||
print("###############################################")
|
|
||||||
except OSError,msg:
|
|
||||||
|
|
||||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [installProFTPD]")
|
|
||||||
return 0
|
|
||||||
except ValueError,msg:
|
|
||||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [installProFTPD]")
|
|
||||||
return 0
|
|
||||||
|
|
||||||
return 1
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def createFTPDataBaseinMariaDB(username,password):
|
|
||||||
try:
|
|
||||||
|
|
||||||
#Create DB
|
|
||||||
#sql.mysqlUtilities.createDatabase("1qaz@9xvps", "ftp", username, password)
|
|
||||||
|
|
||||||
#Add group
|
|
||||||
cmd = []
|
|
||||||
|
|
||||||
cmd.append("groupadd")
|
|
||||||
cmd.append("-g")
|
|
||||||
cmd.append("2001")
|
|
||||||
cmd.append("ftpgroup")
|
|
||||||
|
|
||||||
res = subprocess.call(cmd)
|
|
||||||
if res == 1:
|
|
||||||
print "Group adding failed"
|
|
||||||
else:
|
|
||||||
print "Group added"
|
|
||||||
|
|
||||||
#Add user to group
|
|
||||||
|
|
||||||
cmd = []
|
|
||||||
|
|
||||||
cmd.append("useradd")
|
|
||||||
cmd.append("-u")
|
|
||||||
cmd.append("2001")
|
|
||||||
cmd.append("-s")
|
|
||||||
cmd.append("/bin/false")
|
|
||||||
cmd.append("-d")
|
|
||||||
cmd.append("/bin/null")
|
|
||||||
cmd.append("-c")
|
|
||||||
cmd.append("\"proftpd user\"")
|
|
||||||
cmd.append("-g")
|
|
||||||
cmd.append("ftpgroup")
|
|
||||||
cmd.append("ftpuser")
|
|
||||||
|
|
||||||
res = subprocess.call(cmd)
|
|
||||||
if res == 1:
|
|
||||||
print "User adding failed"
|
|
||||||
else:
|
|
||||||
print "User added"
|
|
||||||
|
|
||||||
#query = "CREATE TABLE ftp_ftpuser (id int(10) unsigned NOT NULL auto_increment,userid varchar(32) NOT NULL default '',passwd varchar(32) NOT NULL default '',uid smallint(6) NOT NULL default '2001',gid smallint(6) NOT NULL default '2001',homedir varchar(255) NOT NULL default '',shell varchar(16) NOT NULL default '/sbin/nologin',count int(11) NOT NULL default '0',accessed datetime NOT NULL default '0000-00-00 00:00:00',modified datetime NOT NULL default '0000-00-00 00:00:00',PRIMARY KEY (id),UNIQUE KEY userid (userid)) ENGINE=MyISAM COMMENT='ProFTP user table';"
|
|
||||||
#sql.mysqlUtilities.SendQuery(username,password,"ftp", query)
|
|
||||||
|
|
||||||
#query = "CREATE TABLE ftpgroup (groupname varchar(16) NOT NULL default '',gid smallint(6) NOT NULL default '2001',members varchar(16) NOT NULL default '',KEY groupname (groupname)) ENGINE=MyISAM COMMENT='ProFTP group table';"
|
|
||||||
#sql.mysqlUtilities.SendQuery(username, password, "ftp", query)
|
|
||||||
|
|
||||||
#query = "INSERT INTO ftpgroup (groupname, gid, members) VALUES ('ftpgroup', '2001', 'ftp_ftpuser');"
|
|
||||||
#sql.mysqlUtilities.SendQuery(username, password, "ftp", query)
|
|
||||||
|
|
||||||
# File Write
|
|
||||||
lines = open("/etc/proftpd.conf").readlines()
|
|
||||||
data = open("/etc/proftpd.conf", "w")
|
|
||||||
|
|
||||||
line1 = "\nLoadModule mod_sql.c\n"
|
|
||||||
line2 = "LoadModule mod_sql_mysql.c\n\n"
|
|
||||||
|
|
||||||
line3 = "SQLAuthTypes Plaintext Crypt\n"
|
|
||||||
line4 = "SQLAuthenticate users groups\n\n"
|
|
||||||
|
|
||||||
line5 = "SQLConnectInfo cybercp@localhost "+username+" "+password+"\n"
|
|
||||||
line6 = "SQLUserInfo ftp_ftp_ftpuser userid passwd uid gid homedir shell\n"
|
|
||||||
line7 = "SQLGroupInfo ftp_ftpgroup groupname gid members\n\n"
|
|
||||||
|
|
||||||
line8 = "SQLLog PASS updatecount\n"
|
|
||||||
line9 = "SQLNamedQuery updatecount UPDATE \"count=count+1, accessed=now() WHERE userid='%u'\" ftp_ftpuser\n\n"
|
|
||||||
|
|
||||||
line10 = "SQLLog STOR,DELE modified\n"
|
|
||||||
line11 = "SQLNamedQuery modified UPDATE \"modified=now() WHERE userid='%u'\" ftp_ftpuser"
|
|
||||||
|
|
||||||
Auth0 = "\n#AuthPAMConfig\n"
|
|
||||||
Auth1 = "#AuthOrder\n"
|
|
||||||
for items in lines:
|
|
||||||
if ((items.find("AuthPAMConfig") > -1)):
|
|
||||||
data.writelines(Auth0)
|
|
||||||
continue
|
|
||||||
|
|
||||||
if ((items.find("AuthOrder") > -1)):
|
|
||||||
data.writelines(Auth1)
|
|
||||||
continue
|
|
||||||
|
|
||||||
data.writelines(items)
|
|
||||||
|
|
||||||
|
|
||||||
data.writelines(line1)
|
|
||||||
data.writelines(line2)
|
|
||||||
data.writelines(line3)
|
|
||||||
data.writelines(line4)
|
|
||||||
data.writelines(line5)
|
|
||||||
data.writelines(line6)
|
|
||||||
data.writelines(line7)
|
|
||||||
data.writelines(line8)
|
|
||||||
data.writelines(line9)
|
|
||||||
data.writelines(line10)
|
|
||||||
data.writelines(line11)
|
|
||||||
|
|
||||||
data.close()
|
|
||||||
|
|
||||||
#File Write End
|
|
||||||
|
|
||||||
except BaseException, msg:
|
|
||||||
logging.CyberCPLogFileWriter.writeToFile(
|
|
||||||
str(msg) + " [IO Error with proftpd config file [createFTPDataBaseinMariaDB]]")
|
|
||||||
return 0
|
|
||||||
return 1
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def createNewFTPAccount(udb,upass,username,password,path):
|
def createNewFTPAccount(udb,upass,username,password,path):
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import shlex
|
|||||||
from mailServer.models import Domains,EUsers
|
from mailServer.models import Domains,EUsers
|
||||||
from emailPremium.models import DomainLimits, EmailLimits
|
from emailPremium.models import DomainLimits, EmailLimits
|
||||||
from websiteFunctions.models import Websites
|
from websiteFunctions.models import Websites
|
||||||
|
from processUtilities import ProcessUtilities
|
||||||
|
|
||||||
|
|
||||||
class mailUtilities:
|
class mailUtilities:
|
||||||
@@ -372,7 +373,10 @@ milter_default_action = accept
|
|||||||
|
|
||||||
mailUtilities.checkHome()
|
mailUtilities.checkHome()
|
||||||
|
|
||||||
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
||||||
command = 'sudo yum install spamassassin -y'
|
command = 'sudo yum install spamassassin -y'
|
||||||
|
else:
|
||||||
|
command = 'sudo apt-get install spamassassin spamc -y'
|
||||||
|
|
||||||
cmd = shlex.split(command)
|
cmd = shlex.split(command)
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import installUtilities
|
|||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
from mailUtilities import mailUtilities
|
from mailUtilities import mailUtilities
|
||||||
|
from processUtilities import ProcessUtilities
|
||||||
|
|
||||||
class phpUtilities:
|
class phpUtilities:
|
||||||
|
|
||||||
@@ -17,7 +18,10 @@ class phpUtilities:
|
|||||||
|
|
||||||
mailUtilities.checkHome()
|
mailUtilities.checkHome()
|
||||||
|
|
||||||
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
||||||
command = 'sudo yum install ' + extension + ' -y'
|
command = 'sudo yum install ' + extension + ' -y'
|
||||||
|
else:
|
||||||
|
command = 'sudo apt-get install ' + extension + ' -y'
|
||||||
|
|
||||||
cmd = shlex.split(command)
|
cmd = shlex.split(command)
|
||||||
|
|
||||||
@@ -45,7 +49,10 @@ class phpUtilities:
|
|||||||
|
|
||||||
mailUtilities.checkHome()
|
mailUtilities.checkHome()
|
||||||
|
|
||||||
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
||||||
command = 'sudo rpm --nodeps -e ' + extension + ' -v'
|
command = 'sudo rpm --nodeps -e ' + extension + ' -v'
|
||||||
|
else:
|
||||||
|
command = 'sudo apt-get remove -y ' + extension
|
||||||
|
|
||||||
cmd = shlex.split(command)
|
cmd = shlex.split(command)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
|||||||
import subprocess
|
import subprocess
|
||||||
import shlex
|
import shlex
|
||||||
import os
|
import os
|
||||||
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
|
||||||
|
|
||||||
class ProcessUtilities:
|
class ProcessUtilities:
|
||||||
litespeedProcess = "litespeed"
|
litespeedProcess = "litespeed"
|
||||||
@@ -74,7 +73,7 @@ class ProcessUtilities:
|
|||||||
try:
|
try:
|
||||||
res = subprocess.call(shlex.split(command))
|
res = subprocess.call(shlex.split(command))
|
||||||
if res == 1:
|
if res == 1:
|
||||||
raise 0
|
return 0
|
||||||
else:
|
else:
|
||||||
return 1
|
return 1
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
@@ -115,18 +114,5 @@ class ProcessUtilities:
|
|||||||
else:
|
else:
|
||||||
return ProcessUtilities.centos
|
return ProcessUtilities.centos
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def executioner(command, statusFile):
|
|
||||||
try:
|
|
||||||
res = subprocess.call(shlex.split(command), stdout=statusFile, stderr=statusFile)
|
|
||||||
if res == 1:
|
|
||||||
raise 0
|
|
||||||
else:
|
|
||||||
return 1
|
|
||||||
|
|
||||||
except BaseException, msg:
|
|
||||||
logging.writeToFile(str(msg))
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ class vhost:
|
|||||||
accessControlEnds = " }\n"
|
accessControlEnds = " }\n"
|
||||||
|
|
||||||
rewriteInherit = """ rewrite {
|
rewriteInherit = """ rewrite {
|
||||||
inherit 0
|
inherit 1
|
||||||
|
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import hashlib
|
|||||||
from mysqlUtilities import mysqlUtilities
|
from mysqlUtilities import mysqlUtilities
|
||||||
from plogical import hashPassword
|
from plogical import hashPassword
|
||||||
from emailMarketing.emACL import emACL
|
from emailMarketing.emACL import emACL
|
||||||
|
from processUtilities import ProcessUtilities
|
||||||
|
|
||||||
class WebsiteManager:
|
class WebsiteManager:
|
||||||
def __init__(self, domain = None, childDomain = None):
|
def __init__(self, domain = None, childDomain = None):
|
||||||
@@ -1253,14 +1254,19 @@ class WebsiteManager:
|
|||||||
|
|
||||||
website = Websites.objects.get(domain=self.domain)
|
website = Websites.objects.get(domain=self.domain)
|
||||||
|
|
||||||
|
try:
|
||||||
|
subprocess.call(('sudo', 'crontab', '-u', website.externalApp, '-'))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
output = subprocess.check_output(["sudo", "/usr/bin/crontab", "-u", website.externalApp, "-l"])
|
output = subprocess.check_output(["sudo", "/usr/bin/crontab", "-u", website.externalApp, "-l"])
|
||||||
|
|
||||||
if "no crontab for" in output:
|
if "no crontab for" in output:
|
||||||
echo = subprocess.Popen(('echo'), stdout=subprocess.PIPE)
|
echo = subprocess.Popen((['cat', '/dev/null']), stdout=subprocess.PIPE)
|
||||||
output = subprocess.call(('sudo', 'crontab', '-u', website.externalApp, '-'), stdin=echo.stdout)
|
subprocess.call(('sudo', 'crontab', '-u', website.externalApp, '-'), stdin=echo.stdout)
|
||||||
echo.wait()
|
echo.wait()
|
||||||
echo.stdout.close()
|
echo.stdout.close()
|
||||||
|
output = subprocess.check_output(["sudo", "/usr/bin/crontab", "-u", website.externalApp, "-l"])
|
||||||
if "no crontab for" in output:
|
if "no crontab for" in output:
|
||||||
data_ret = {'addNewCron': 0, 'error_message': 'Unable to initialise crontab file for user'}
|
data_ret = {'addNewCron': 0, 'error_message': 'Unable to initialise crontab file for user'}
|
||||||
final_json = json.dumps(data_ret)
|
final_json = json.dumps(data_ret)
|
||||||
@@ -1732,7 +1738,10 @@ class WebsiteManager:
|
|||||||
return render(request, 'websiteFunctions/setupGit.html',
|
return render(request, 'websiteFunctions/setupGit.html',
|
||||||
{'domainName': self.domain, 'installed': 1, 'webhookURL': webhookURL})
|
{'domainName': self.domain, 'installed': 1, 'webhookURL': webhookURL})
|
||||||
else:
|
else:
|
||||||
command = 'sudo cat /root/.ssh/cyberpanel.pub'
|
command = "sudo ssh-keygen -f /root/.ssh/" + self.domain + " -t rsa -N ''"
|
||||||
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
|
command = 'sudo cat /root/.ssh/' + self.domain + '.pub'
|
||||||
deploymentKey = subprocess.check_output(shlex.split(command)).strip('\n')
|
deploymentKey = subprocess.check_output(shlex.split(command)).strip('\n')
|
||||||
|
|
||||||
return render(request, 'websiteFunctions/setupGit.html',
|
return render(request, 'websiteFunctions/setupGit.html',
|
||||||
|
|||||||
@@ -192,8 +192,7 @@ class ServerStatusUtil:
|
|||||||
command = 'mkdir -p ' + confPath
|
command = 'mkdir -p ' + confPath
|
||||||
ServerStatusUtil.executioner(command, FNULL)
|
ServerStatusUtil.executioner(command, FNULL)
|
||||||
|
|
||||||
if vhost.perHostDomainConf(website.path, website.master.domain, virtualHostName, completePathToConfigFile, website.master.adminEmail, website.master.externalApp,
|
if vhost.perHostDomainConf(website.path, website.master.domain, virtualHostName, completePathToConfigFile, website.master.adminEmail, website.phpSelection, website.master.externalApp, 1) == 1:
|
||||||
website.phpSelection, 1) == 1:
|
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
return 0
|
return 0
|
||||||
@@ -227,16 +226,28 @@ class ServerStatusUtil:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
childs = website.childdomains_set.all()
|
childs = website.childdomains_set.all()
|
||||||
|
|
||||||
for child in childs:
|
for child in childs:
|
||||||
|
try:
|
||||||
if ServerStatusUtil.createDomain(child) == 0:
|
if ServerStatusUtil.createDomain(child) == 0:
|
||||||
return 0
|
logging.CyberCPLogFileWriter.writeToFile(
|
||||||
|
'Error while creating child domain: ' + child.domain)
|
||||||
|
except BaseException, msg:
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile(
|
||||||
|
'Error while creating child domain: ' + child.domain + ' . Exact message: ' + str(
|
||||||
|
msg))
|
||||||
|
|
||||||
aliases = website.aliasdomains_set.all()
|
aliases = website.aliasdomains_set.all()
|
||||||
|
|
||||||
for alias in aliases:
|
for alias in aliases:
|
||||||
|
try:
|
||||||
aliasDomain = alias.aliasDomain
|
aliasDomain = alias.aliasDomain
|
||||||
alias.delete()
|
alias.delete()
|
||||||
virtualHostUtilities.createAlias(website.domain, aliasDomain, 0, '/home', website.adminEmail, website.admin)
|
virtualHostUtilities.createAlias(website.domain, aliasDomain, 0, '/home', website.adminEmail, website.admin)
|
||||||
|
except BaseException, msg:
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile(
|
||||||
|
'Error while creating alais domain: ' + aliasDomain + ' . Exact message: ' + str(
|
||||||
|
msg))
|
||||||
|
|
||||||
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
|
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
|
||||||
"vhost conf successfully built for: " + website.domain + ".\n", 1)
|
"vhost conf successfully built for: " + website.domain + ".\n", 1)
|
||||||
@@ -304,6 +315,9 @@ class ServerStatusUtil:
|
|||||||
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
|
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
|
||||||
"vhost conf successfully built.\n", 1)
|
"vhost conf successfully built.\n", 1)
|
||||||
|
|
||||||
|
ProcessUtilities.stopLitespeed()
|
||||||
|
ProcessUtilities.restartLitespeed()
|
||||||
|
|
||||||
|
|
||||||
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,"Successfully switched to LITESPEED ENTERPRISE WEB SERVER. [200]\n", 1)
|
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,"Successfully switched to LITESPEED ENTERPRISE WEB SERVER. [200]\n", 1)
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user