mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-13 01:26:30 +02:00
feature: add port option for backup v2 https://community.cyberpanel.net/t/backup-v2-need-to-change-port-of-sftp-backend/52106
This commit is contained in:
@@ -1877,6 +1877,7 @@ app.controller('ConfigureV2Backup', function ($scope, $http, $timeout) {
|
||||
hostName: $scope.hostName,
|
||||
UserName: $scope.UserName,
|
||||
Repo_Name: $scope.reponame,
|
||||
sshPort: $scope.sshPort
|
||||
};
|
||||
|
||||
var config = {
|
||||
|
||||
@@ -134,6 +134,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-hide="installationDetailsForm" class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "SSH Port" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input name="sshPort" type="text" class="form-control"
|
||||
ng-model="sshPort" value="Default SSH Port is 22">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -986,6 +986,7 @@ def ConfigureSftpV2Backup(request):
|
||||
hostName = data['hostName']
|
||||
UserName = data['UserName']
|
||||
Repo_Name = data['Repo_Name']
|
||||
sshPort = data['sshPort']
|
||||
currentACL = ACLManager.loadedACL(userID)
|
||||
admin = Administrator.objects.get(pk=userID)
|
||||
|
||||
@@ -1001,6 +1002,11 @@ def ConfigureSftpV2Backup(request):
|
||||
req_data['password'] = sfptpasswd
|
||||
req_data['Repo_Name'] = Repo_Name
|
||||
|
||||
try:
|
||||
req_data['sshPort'] = sshPort
|
||||
except:
|
||||
req_data['sshPort'] = '22'
|
||||
|
||||
|
||||
cpbuv2 = CPBackupsV2(
|
||||
{'domain': Selectedwebsite, 'BasePath': '/home/backup', 'BackupDatabase': 1, 'BackupData': 1,
|
||||
|
||||
Reference in New Issue
Block a user