From fcaf433cc68583e3c25a197bc266f70178be2da8 Mon Sep 17 00:00:00 2001
From: usmannasir <01-134132-158@student.bahria.edu.pk>
Date: Mon, 19 Feb 2018 23:42:57 +0500
Subject: [PATCH] Bug fix to Backups!
---
backup/views.py | 27 ++++-------
.../assets/finalBase/finalBaseTheme.css | 1 -
.../themes/admin/color-schemes/default.css | 7 ++-
.../templates/baseTemplate/index.html | 10 +---
plogical/backupSchedule.py | 15 +++---
plogical/backupUtilities.py | 47 ++++++-------------
plogical/sslUtilities.py | 10 ++--
static/backup/backup.js | 24 ++--------
.../assets/finalBase/finalBaseTheme.css | 1 -
.../themes/admin/color-schemes/default.css | 7 ++-
websiteFunctions/views.py | 7 ++-
11 files changed, 63 insertions(+), 93 deletions(-)
diff --git a/backup/views.py b/backup/views.py
index 8acd0b3bd..553ae254f 100644
--- a/backup/views.py
+++ b/backup/views.py
@@ -45,7 +45,6 @@ def loadBackupHome(request):
except KeyError:
return redirect(loadLoginPage)
-
def restoreSite(request):
try:
val = request.session['userID']
@@ -123,7 +122,6 @@ def backupSite(request):
except KeyError:
return redirect(loadLoginPage)
-
def getCurrentBackups(request):
try:
val = request.session['userID']
@@ -190,9 +188,7 @@ def submitBackupCreation(request):
## /home/example.com/backup
backupPath = os.path.join("/home",backupDomain,"backup/")
-
domainUser = website.externalApp
-
backupName = 'backup-' + domainUser + "-" + time.strftime("%I-%M-%S-%a-%b-%Y")
## /home/example.com/backup/backup-example-06-50-03-Thu-Feb-2018
@@ -200,7 +196,7 @@ def submitBackupCreation(request):
## Generating meta
- ## xml generation
+ ## XML Generation
metaFileXML = Element('metaFile')
@@ -218,7 +214,7 @@ def submitBackupCreation(request):
databases = website.databases_set.all()
- ## child domains xml
+ ## Child domains XML
childDomainsXML = Element('ChildDomains')
@@ -238,7 +234,7 @@ def submitBackupCreation(request):
metaFileXML.append(childDomainsXML)
- ## Databases
+ ## Databases XML
databasesXML = Element('Databases')
@@ -258,7 +254,7 @@ def submitBackupCreation(request):
metaFileXML.append(databasesXML)
- ## DNS Records
+ ## DNS Records XML
try:
dnsRecordsXML = Element("dnsrecords")
@@ -284,7 +280,7 @@ def submitBackupCreation(request):
except BaseException,msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg))
- ## email accounts
+ ## Email accounts XML
try:
emailRecordsXML = Element('emails')
@@ -309,8 +305,6 @@ def submitBackupCreation(request):
## Email meta generated!
-
-
def prettify(elem):
"""Return a pretty-printed XML string for the Element.
"""
@@ -373,7 +367,7 @@ def backupStatus(request):
command = "sudo cat " + status
status = subprocess.check_output(shlex.split(command))
- if status.find("completed")> -1:
+ if status.find("Completed")> -1:
command = 'sudo rm -f ' + status
subprocess.call(shlex.split(command))
@@ -502,7 +496,6 @@ def deleteBackup(request):
final_json = json.dumps(final_dic)
return HttpResponse(final_json)
-
def submitRestore(request):
try:
if request.method == 'POST':
@@ -590,14 +583,13 @@ def restoreStatus(request):
final_json = json.dumps(final_dic)
return HttpResponse(final_json)
-
def backupDestinations(request):
try:
val = request.session['userID']
admin = Administrator.objects.get(pk=val)
- if admin.type==1:
+ if admin.type == 1:
return render(request, 'backup/backupDestinations.html', {})
else:
return HttpResponse("You should be admin to add backup destinations.")
@@ -609,13 +601,13 @@ def submitDestinationCreation(request):
try:
if request.method == 'POST':
-
destinations = backupUtil.backupUtilities.destinationsPath
data = json.loads(request.body)
ipAddress = data['IPAddress']
password = data['password']
port = "22"
+
try:
port = data['backupSSHPort']
except:
@@ -632,8 +624,9 @@ def submitDestinationCreation(request):
return HttpResponse(final_json)
except:
setupKeys = backupUtil.backupUtilities.setupSSHKeys(ipAddress,password,port)
+
if setupKeys[0] == 1:
- backupUtil.backupUtilities.initiateBackupDirCreation(ipAddress,port)
+ backupUtil.backupUtilities.createBackupDir(ipAddress,port)
try:
writeToFile = open(destinations, "w")
writeToFile.writelines(ipAddress + "\n")
diff --git a/baseTemplate/static/baseTemplate/assets/finalBase/finalBaseTheme.css b/baseTemplate/static/baseTemplate/assets/finalBase/finalBaseTheme.css
index 576a7c732..e4f741d4d 100644
--- a/baseTemplate/static/baseTemplate/assets/finalBase/finalBaseTheme.css
+++ b/baseTemplate/static/baseTemplate/assets/finalBase/finalBaseTheme.css
@@ -8,7 +8,6 @@
@media (max-width:1050px){.info-box.icon-wrapper{padding-left:50px}.info-box.icon-wrapper .icon-large{font-size:70px}.info-box .stats{font-size:20px}.info-box b{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}@media screen and (max-width:650px){.heading-1 small,.messages-box li .messages-text{overflow:hidden;text-overflow:ellipsis}.mobile-hidden{display:none!important}.mobile-buttons a.btn{display:block;float:none;min-width:1px;max-width:100%;margin:0 0 5px}.heading-1 .heading-content{width:80%}.content-box .content-box-wrapper{padding:5px}.popover{min-width:100px!important}.medium-box,.scrollable-small{width:300px!important}.chat-box li{padding-right:50px}.chat-box li.float-left{padding-left:50px}.chat-box .popover .popover-content{font-size:11px;line-height:1.5em;padding:5px}.chat-box .chat-author img{width:34px;min-width:34px}.notifications-box li .notification-text{display:block;overflow:hidden;width:44%;white-space:nowrap;text-overflow:ellipsis}.notifications-box li .notification-time{margin:0}.messages-box li .messages-text{width:100%;white-space:nowrap}}
-@media only screen and (min-width:20em){#header-logo,#theme-options{display:none}#page-sidebar{transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);-webkit-transform:translateX(0);visibility:hidden}#page-content{margin-left:0}}@media only screen and (min-width:56.25em){#header-logo,#page-sidebar.collapse,#theme-options{display:block}#mobile-navigation{display:none}#page-sidebar{transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);-webkit-transform:translateX(0);visibility:visible}#page-content{margin-left:260px}}@media only screen and (max-width:760px){#cloud-btn,#header-nav-right #fullscreen-btn{display:none}}@media only screen and (max-width:630px){#page-header .user-account-btn>a.user-profile span{display:none}#page-header .user-account-btn .dropdown-menu:after,#page-header .user-account-btn .dropdown-menu:before{left:56px}}@media only screen and (max-width:545px){#header-nav-right #chatbox-btn{display:none}}@media only screen and (max-width:520px){#dashnav-btn,#page-header .user-account-btn>a.user-profile span{display:none}.popover{width:100%;border-radius:0}.box-md{width:auto}}@media only screen and (max-width:460px){.box-sm,.timeline-box .popover{width:auto}#page-content{padding:10px}#page-title{padding:10px 0 15px;text-align:center}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{margin-bottom:20px}.content-box{margin-top:0!important}.row.mrg20B{margin-bottom:0!important}#page-title p,#progress-btn,.dashboard-box .list-grade,.header-buttons-separator,.todo-box .bs-label,.todo-box .btn,.tooltip .tooltip-arrow{display:none}}@media only screen and (max-width:410px){#header-nav-right #logout-btn,#notifications-btn{display:none}#header-nav-left{float:right}#header-nav-right{margin-right:0;margin-left:15px;float:left}.dropdown-menu{position:fixed;left:0!important;width:100%;border-radius:0}#page-header .user-account-btn .dropdown-menu{top:65px}#page-header .user-account-btn .dropdown-menu:after,#page-header .user-account-btn .dropdown-menu:before{left:auto;right:24px}}
.c100:after,.c100>span{display:block;position:absolute}.clearfix:after,.dark-area{clear:both}.c100.p100 .slice,.c100.p51 .slice,.c100.p52 .slice,.c100.p53 .slice,.c100.p54 .slice,.c100.p55 .slice,.c100.p56 .slice,.c100.p57 .slice,.c100.p58 .slice,.c100.p59 .slice,.c100.p60 .slice,.c100.p61 .slice,.c100.p62 .slice,.c100.p63 .slice,.c100.p64 .slice,.c100.p65 .slice,.c100.p66 .slice,.c100.p67 .slice,.c100.p68 .slice,.c100.p69 .slice,.c100.p70 .slice,.c100.p71 .slice,.c100.p72 .slice,.c100.p73 .slice,.c100.p74 .slice,.c100.p75 .slice,.c100.p76 .slice,.c100.p77 .slice,.c100.p78 .slice,.c100.p79 .slice,.c100.p80 .slice,.c100.p81 .slice,.c100.p82 .slice,.c100.p83 .slice,.c100.p84 .slice,.c100.p85 .slice,.c100.p86 .slice,.c100.p87 .slice,.c100.p88 .slice,.c100.p89 .slice,.c100.p90 .slice,.c100.p91 .slice,.c100.p92 .slice,.c100.p93 .slice,.c100.p94 .slice,.c100.p95 .slice,.c100.p96 .slice,.c100.p97 .slice,.c100.p98 .slice,.c100.p99 .slice,.rect-auto{clip:rect(auto,auto,auto,auto)}.c100 .bar,.c100.p100 .fill,.c100.p51 .fill,.c100.p52 .fill,.c100.p53 .fill,.c100.p54 .fill,.c100.p55 .fill,.c100.p56 .fill,.c100.p57 .fill,.c100.p58 .fill,.c100.p59 .fill,.c100.p60 .fill,.c100.p61 .fill,.c100.p62 .fill,.c100.p63 .fill,.c100.p64 .fill,.c100.p65 .fill,.c100.p66 .fill,.c100.p67 .fill,.c100.p68 .fill,.c100.p69 .fill,.c100.p70 .fill,.c100.p71 .fill,.c100.p72 .fill,.c100.p73 .fill,.c100.p74 .fill,.c100.p75 .fill,.c100.p76 .fill,.c100.p77 .fill,.c100.p78 .fill,.c100.p79 .fill,.c100.p80 .fill,.c100.p81 .fill,.c100.p82 .fill,.c100.p83 .fill,.c100.p84 .fill,.c100.p85 .fill,.c100.p86 .fill,.c100.p87 .fill,.c100.p88 .fill,.c100.p89 .fill,.c100.p90 .fill,.c100.p91 .fill,.c100.p92 .fill,.c100.p93 .fill,.c100.p94 .fill,.c100.p95 .fill,.c100.p96 .fill,.c100.p97 .fill,.c100.p98 .fill,.c100.p99 .fill,.pie{position:absolute;border:.08em solid #307bbb;width:.84em;height:.84em;clip:rect(0,.5em,1em,0);-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;-webkit-transform:rotate(0);-moz-transform:rotate(0);-ms-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0)}.c100.p100 .bar:after,.c100.p100 .fill,.c100.p51 .bar:after,.c100.p51 .fill,.c100.p52 .bar:after,.c100.p52 .fill,.c100.p53 .bar:after,.c100.p53 .fill,.c100.p54 .bar:after,.c100.p54 .fill,.c100.p55 .bar:after,.c100.p55 .fill,.c100.p56 .bar:after,.c100.p56 .fill,.c100.p57 .bar:after,.c100.p57 .fill,.c100.p58 .bar:after,.c100.p58 .fill,.c100.p59 .bar:after,.c100.p59 .fill,.c100.p60 .bar:after,.c100.p60 .fill,.c100.p61 .bar:after,.c100.p61 .fill,.c100.p62 .bar:after,.c100.p62 .fill,.c100.p63 .bar:after,.c100.p63 .fill,.c100.p64 .bar:after,.c100.p64 .fill,.c100.p65 .bar:after,.c100.p65 .fill,.c100.p66 .bar:after,.c100.p66 .fill,.c100.p67 .bar:after,.c100.p67 .fill,.c100.p68 .bar:after,.c100.p68 .fill,.c100.p69 .bar:after,.c100.p69 .fill,.c100.p70 .bar:after,.c100.p70 .fill,.c100.p71 .bar:after,.c100.p71 .fill,.c100.p72 .bar:after,.c100.p72 .fill,.c100.p73 .bar:after,.c100.p73 .fill,.c100.p74 .bar:after,.c100.p74 .fill,.c100.p75 .bar:after,.c100.p75 .fill,.c100.p76 .bar:after,.c100.p76 .fill,.c100.p77 .bar:after,.c100.p77 .fill,.c100.p78 .bar:after,.c100.p78 .fill,.c100.p79 .bar:after,.c100.p79 .fill,.c100.p80 .bar:after,.c100.p80 .fill,.c100.p81 .bar:after,.c100.p81 .fill,.c100.p82 .bar:after,.c100.p82 .fill,.c100.p83 .bar:after,.c100.p83 .fill,.c100.p84 .bar:after,.c100.p84 .fill,.c100.p85 .bar:after,.c100.p85 .fill,.c100.p86 .bar:after,.c100.p86 .fill,.c100.p87 .bar:after,.c100.p87 .fill,.c100.p88 .bar:after,.c100.p88 .fill,.c100.p89 .bar:after,.c100.p89 .fill,.c100.p90 .bar:after,.c100.p90 .fill,.c100.p91 .bar:after,.c100.p91 .fill,.c100.p92 .bar:after,.c100.p92 .fill,.c100.p93 .bar:after,.c100.p93 .fill,.c100.p94 .bar:after,.c100.p94 .fill,.c100.p95 .bar:after,.c100.p95 .fill,.c100.p96 .bar:after,.c100.p96 .fill,.c100.p97 .bar:after,.c100.p97 .fill,.c100.p98 .bar:after,.c100.p98 .fill,.c100.p99 .bar:after,.c100.p99 .fill,.pie-fill{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.c100{position:relative;font-size:120px;width:1em;height:1em;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;float:left;margin:0 .1em .1em 0;background-color:#ccc}.c100 *,.c100 :after,.c100 :before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.c100.center{float:none;margin:0 auto}.c100.big{font-size:240px}.c100.small{font-size:80px}.c100>span{z-index:1;left:0;top:0;width:5em;line-height:5em;font-size:.2em;color:#ccc;text-align:center;white-space:nowrap;-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;transition-property:all;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:ease-out;-moz-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.c100:after{top:.08em;left:.08em;content:" ";-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;background-color:#f5f5f5;width:.84em;height:.84em;-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;transition-property:all;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:ease-in;-moz-transition-timing-function:ease-in;-o-transition-timing-function:ease-in;transition-timing-function:ease-in}.c100 .slice{position:absolute;width:1em;height:1em;clip:rect(0,1em,1em,.5em)}.c100:hover{cursor:default}.c100:hover>span{width:3.33em;line-height:3.33em;font-size:.3em;color:#307bbb}.c100:hover:after{top:.04em;left:.04em;width:.92em;height:.92em}.c100.dark{background-color:#777}.c100.dark:after,.dark-area{background-color:#666}.c100.dark .bar,.c100.dark .fill{border-color:#c6ff00!important}.c100.green .bar,.c100.green .fill,.c100.green.dark .bar,.c100.green.dark .fill{border-color:#2ecc71!important}.c100.dark>span{color:#777}.c100.dark:hover>span{color:#c6ff00}.c100.green.dark:hover>span,.c100.green:hover>span{color:#2ecc71}.c100.orange .bar,.c100.orange .fill{border-color:#dd9d22!important}.c100.orange:hover>span{color:#dd9d22}.c100.orange.dark .bar,.c100.orange.dark .fill{border-color:#e08833!important}.c100.pink .bar,.c100.pink .fill,.c100.pink.dark .bar,.c100.pink.dark .fill{border-color:#ff8e8e!important}.c100.orange.dark:hover>span{color:#e08833}.c100.pink.dark:hover>span,.c100.pink:hover>span{color:#ff8e8e}.c100.red .bar,.c100.red .fill,.c100.red.dark .bar,.c100.red.dark .fill{border-color:#ff5757!important}.c100.red.dark:hover>span,.c100.red:hover>span{color:#ff5757}.dark-area{padding:40px;margin:0 -40px 20px}.clearfix:after,.clearfix:before{content:" ";display:table}@media only screen and (min-width:800px){.progress-center{padding-left:30%}}@media only screen and (max-width:800px){.progress-center{padding-left:32%}.custom-padding{padding-left:7%;padding-bottom:2%}}@media only screen and (max-width:400px){.progress-center{padding-left:30%}.custom-padding{padding-left:7%;padding-bottom:2%}}@-moz-keyframes fill{0%{height:0%}60%{height:110%}70%{height:95%}80%{height:105%}100%{height:100%}}@-webkit-keyframes fill{0%{height:0%}60%{height:110%}70%{height:95%}80%{height:105%}100%{height:100%}}@keyframes fill{0%{height:0%}60%{height:110%}70%{height:95%}80%{height:105%}100%{height:100%}}.box{width:200px;height:120px;position:relative;display:inline-block}.box .container,.box .fill{width:100%;height:100%;position:absolute;bottom:0}.box .container{box-sizing:border-box;z-index:3;text-align:center;color:#fff;font-size:14px;padding-top:15px}.box .container .number{font-size:30px;margin-top:25px}.box .fill{z-index:2;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.box .fill.speed1{-moz-animation:fill 1s ease-out;-webkit-animation:fill 1s ease-out;animation:fill 1s ease-out}.box .fill.speed2{-moz-animation:fill 1.1s ease-out;-webkit-animation:fill 1.1s ease-out;animation:fill 1.1s ease-out}.box .fill.speed3{-moz-animation:fill 1.2s ease-out;-webkit-animation:fill 1.2s ease-out;animation:fill 1.2s ease-out}.box .fill.speed4{-moz-animation:fill 1.3s ease-out;-webkit-animation:fill 1.3s ease-out;animation:fill 1.3s ease-out}.hide-on-phone{display:none}
diff --git a/baseTemplate/static/baseTemplate/assets/themes/admin/color-schemes/default.css b/baseTemplate/static/baseTemplate/assets/themes/admin/color-schemes/default.css
index 03178e748..b7810574d 100755
--- a/baseTemplate/static/baseTemplate/assets/themes/admin/color-schemes/default.css
+++ b/baseTemplate/static/baseTemplate/assets/themes/admin/color-schemes/default.css
@@ -129,4 +129,9 @@ h1, h2, h3, h4, h5, h6,
}
#page-sidebar.font-inverse #sidebar-menu li .sidebar-submenu ul li a:hover {
background: rgba(255,255,255,0.05);
-}
\ No newline at end of file
+}
+
+
+/* Admin responsive */
+
+@media only screen and (min-width:20em){#header-logo,#theme-options{display:none}#page-sidebar{transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);-webkit-transform:translateX(0);visibility:hidden}#page-content{margin-left:0}}@media only screen and (min-width:56.25em){#header-logo,#page-sidebar.collapse,#theme-options{display:block}#mobile-navigation{display:none}#page-sidebar{transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);-webkit-transform:translateX(0);visibility:visible}#page-content{margin-left:260px}}@media only screen and (max-width:760px){#cloud-btn,#header-nav-right #fullscreen-btn{display:none}}@media only screen and (max-width:630px){#page-header .user-account-btn>a.user-profile span{display:none}#page-header .user-account-btn .dropdown-menu:after,#page-header .user-account-btn .dropdown-menu:before{left:56px}}@media only screen and (max-width:545px){#header-nav-right #chatbox-btn{display:none}}@media only screen and (max-width:520px){#dashnav-btn,#page-header .user-account-btn>a.user-profile span{display:none}.popover{width:100%;border-radius:0}.box-md{width:auto}}@media only screen and (max-width:460px){.box-sm,.timeline-box .popover{width:auto}#page-content{padding:10px}#page-title{padding:10px 0 15px;text-align:center}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{margin-bottom:20px}.content-box{margin-top:0!important}.row.mrg20B{margin-bottom:0!important}#page-title p,#progress-btn,.dashboard-box .list-grade,.header-buttons-separator,.todo-box .bs-label,.todo-box .btn,.tooltip .tooltip-arrow{display:none}}@media only screen and (max-width:410px){#header-nav-right #logout-btn,#notifications-btn{display:none}#header-nav-left{float:right}#header-nav-right{margin-right:0;margin-left:15px;float:left}.dropdown-menu{position:fixed;left:0!important;width:100%;border-radius:0}#page-header .user-account-btn .dropdown-menu{top:65px}#page-header .user-account-btn .dropdown-menu:after,#page-header .user-account-btn .dropdown-menu:before{left:auto;right:24px}}
\ No newline at end of file
diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html
index 720e6d67b..92cfdea04 100755
--- a/baseTemplate/templates/baseTemplate/index.html
+++ b/baseTemplate/templates/baseTemplate/index.html
@@ -19,15 +19,9 @@
{% load static %}
-
-
-
-
-
-
@@ -41,7 +35,6 @@
-
@@ -49,7 +42,8 @@
-
+
+
diff --git a/plogical/backupSchedule.py b/plogical/backupSchedule.py
index 44a71a477..7c3010ebc 100644
--- a/plogical/backupSchedule.py
+++ b/plogical/backupSchedule.py
@@ -32,7 +32,9 @@ class backupSchedule:
time.sleep(2)
data = json.loads(r.text)
- if data['status'] == 0:
+ if data['backupStatus'] == 0:
+ break
+ elif data['abort'] == 1:
break
writeToFile.writelines("[" + time.strftime(
@@ -61,10 +63,8 @@ class backupSchedule:
@staticmethod
def sendBackup(backupPath, IPAddress, writeToFile,port):
try:
- command = 'rsync -avz -e "ssh -i /root/.ssh/cyberpanel -o StrictHostKeyChecking=no -p '+port+'" ' + backupPath + ' root@' + IPAddress + ':/home/backup/' + time.strftime(
- "%a-%b") + "/"
+ command = "sudo scp -P "+port+" -i /root/.ssh/cyberpanel " + backupPath + " root@"+IPAddress+":/home/backup/"+ time.strftime("%a-%b") + "/"
subprocess.call(shlex.split(command), stdout=writeToFile)
-
except BaseException, msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startBackup]")
@@ -75,8 +75,6 @@ class backupSchedule:
backupLogPath = "/usr/local/lscp/logs/backup_log."+time.strftime("%I-%M-%S-%a-%b-%Y")
-
-
writeToFile = open(backupLogPath,"a")
writeToFile.writelines("#################################################\n")
@@ -99,6 +97,11 @@ class backupSchedule:
"%I-%M-%S-%a-%b-%Y") + "]" + " Connection to:" + ipAddress+" Failed, please resetup this destination from CyberPanel, aborting." + "\n")
return 0
else:
+ ## Create backup dir on remote server
+
+ command = "sudo ssh -o StrictHostKeyChecking=no -p " + port + " -i /root/.ssh/cyberpanel root@" + ipAddress + " mkdir /home/backup/" + time.strftime("%a-%b")
+ subprocess.call(shlex.split(command))
+
pass
else:
writeToFile.writelines("[" + time.strftime(
diff --git a/plogical/backupUtilities.py b/plogical/backupUtilities.py
index a625b00b2..d7f380188 100644
--- a/plogical/backupUtilities.py
+++ b/plogical/backupUtilities.py
@@ -16,6 +16,7 @@ import argparse
from shutil import move,copy
import sys
from xml.etree import ElementTree
+import time
@@ -82,7 +83,7 @@ class backupUtilities:
rmtree(tempStoragePath)
status = open(os.path.join(backupPath,'status'), "w")
- status.write("completed\n")
+ status.write("Completed\n")
status.close()
@@ -144,12 +145,11 @@ class backupUtilities:
status = open(os.path.join(completPath,'status'), "w")
- status.write("Extracting Main Archive")
+ status.write("Extracting Main Archive!")
status.close()
## Converting /home/backup/backup-example-06-50-03-Thu-Feb-2018.tar.gz -> /home/backup/backup-example-06-50-03-Thu-Feb-2018
-
tar = tarfile.open(originalFile)
tar.extractall(completPath)
tar.close()
@@ -157,7 +157,7 @@ class backupUtilities:
status = open(os.path.join(completPath,'status'), "w")
- status.write("Creating Account and databases!")
+ status.write("Creating Accounts,Databases and DNS records!")
status.close()
## creating website and its dabases
@@ -171,13 +171,12 @@ class backupUtilities:
pass
else:
status = open(os.path.join(completPath,'status'), "w")
- status.write("Error Message: " + data['error_message'] +". Not able to create Account and Databases, aborting. [5009]")
+ status.write("Error Message: " + data['error_message'] +". Not able to create Account, Databasesand DNS Records, aborting. [5009]")
status.close()
- logging.CyberCPLogFileWriter.writeToFile(r.text)
return 0
except BaseException,msg:
status = open(os.path.join(completPath,'status'), "w")
- status.write("Error Message: " + str(msg) +". Not able to create Account and databases, aborting. [5009]")
+ status.write("Error Message: " + str(msg) +". Not able to create Account, Databasesand DNS Records, aborting. [5009]")
status.close()
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [startRestore]")
return 0
@@ -234,7 +233,6 @@ class backupUtilities:
## Restoring email accounts
-
status = open(os.path.join(completPath, 'status'), "w")
status.write("Restoring email accounts!")
status.close()
@@ -314,20 +312,21 @@ class backupUtilities:
## emails extracted
- ## change permissions
+ ## Change permissions
command = "chmod -r vmail:vmail " + emailHome
subprocess.call(shlex.split(command))
+ ##
+
status = open(os.path.join(completPath,'status'), "w")
status.write("Done")
status.close()
+
installUtilities.reStartLiteSpeed()
command = "chown -R " + externalApp + ":" + externalApp + " " + websiteHome
-
cmd = shlex.split(command)
-
subprocess.call(cmd)
except BaseException, msg:
@@ -384,7 +383,6 @@ class backupUtilities:
expectation = "password:"
-
command = "ssh -o StrictHostKeyChecking=no -p "+ port +" root@"+IPAddress+" mkdir /root/.ssh"
setupKeys = pexpect.spawn(command,timeout=3)
@@ -404,7 +402,7 @@ class backupUtilities:
index = setupKeys.expect(expectation)
if index == 0:
- return [0,"Wrong Password"]
+ return [0,"Wrong Password!"]
elif index == 1:
setupKeys.wait()
@@ -547,32 +545,17 @@ class backupUtilities:
def createBackupDir(IPAddress,port):
try:
- command = "ssh -o StrictHostKeyChecking=no -p "+ port +" -i /home/cyberpanel/.ssh/cyberpanel cyberpanel@"+IPAddress+" mkdir /home/backup"
-
- shlex.split(command)
-
+ command = "sudo ssh -o StrictHostKeyChecking=no -p "+ port +" -i /root/.ssh/cyberpanel root@"+IPAddress+" mkdir /home/backup"
subprocess.call(shlex.split(command))
-
except BaseException, msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [createBackupDir]")
return 0
- @staticmethod
- def initiateBackupDirCreation(IPAddress,port):
- try:
- thread.start_new_thread(backupUtilities.createBackupDir, (IPAddress,port))
- except BaseException,msg:
- logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [initiateBackupDirCreation]")
-
@staticmethod
def host_key_verification(IPAddress):
try:
command = 'sudo ssh-keygen -R '+IPAddress
-
- shlex.split(command)
-
subprocess.call(shlex.split(command))
-
except BaseException, msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [host_key_verification]")
return 0
@@ -597,7 +580,7 @@ def submitBackupCreation(tempStoragePath,backupName,backupPath,metaPath):
p = Process(target=backupUtilities.startBackup, args=(tempStoragePath, backupName, backupPath,))
p.start()
- pid = open(backupPath + 'pid', "w")
+ pid = open(os.path.join(backupPath,'pid'), "w")
pid.write(str(p.pid))
pid.close()
@@ -687,6 +670,4 @@ def main():
submitRestore(args.backupFile,args.dir)
if __name__ == "__main__":
- main()
-
-
+ main()
\ No newline at end of file
diff --git a/plogical/sslUtilities.py b/plogical/sslUtilities.py
index e5df76684..5e21700d4 100644
--- a/plogical/sslUtilities.py
+++ b/plogical/sslUtilities.py
@@ -135,18 +135,22 @@ class sslUtilities:
# command = "sudo certbot certonly -n --agree-tos --email " + adminEmail + " --webroot -w " + sslpath + " -d " + virtualHostName
try:
- serverIPAddress = requests.get('https://api.ipify.org').text
+ ipFile = "/etc/cyberpanel/machineIP"
+ f = open(ipFile)
+ ipData = f.read()
+ serverIPAddress = ipData.split('\n', 1)[0]
+
domainIP = socket.gethostbyname("www."+virtualHostName)
if serverIPAddress == domainIP:
command = "certbot certonly -n --agree-tos --email " + adminEmail + " --webroot -w " + sslpath + " -d " + virtualHostName + " -d www." + virtualHostName
else:
command = "certbot certonly -n --agree-tos --email " + adminEmail + " --webroot -w " + sslpath + " -d " + virtualHostName
logging.CyberCPLogFileWriter.writeToFile(
- "SSL is issues without 'www' due to DNS error! for domain :" + virtualHostName)
+ "SSL is issued without 'www' due to DNS error! for domain :" + virtualHostName)
except:
command = "certbot certonly -n --agree-tos --email " + adminEmail + " --webroot -w " + sslpath + " -d " + virtualHostName
- logging.CyberCPLogFileWriter.writeToFile("SSL is issues without 'www' due to DNS error! for domain : " + virtualHostName)
+ logging.CyberCPLogFileWriter.writeToFile("SSL is issued without 'www' due to DNS error! for domain : " + virtualHostName)
expectation = []
diff --git a/static/backup/backup.js b/static/backup/backup.js
index 82207b41d..9242635ab 100644
--- a/static/backup/backup.js
+++ b/static/backup/backup.js
@@ -36,7 +36,6 @@ app.controller('backupWebsiteControl', function($scope,$http,$timeout) {
};
$scope.fetchDetails = function () {
-
getBackupStatus();
populateCurrentRecords();
$scope.destination = false;
@@ -71,10 +70,9 @@ app.controller('backupWebsiteControl', function($scope,$http,$timeout) {
function ListInitialDatas(response) {
- if(response.data.backupStatus == 1){
+ if(response.data.backupStatus === 1){
if(response.data.abort === 1){
-
$timeout.cancel();
$scope.backupLoadingBottom = true;
$scope.destination = false;
@@ -108,11 +106,7 @@ app.controller('backupWebsiteControl', function($scope,$http,$timeout) {
}
}
- function cantLoadInitialDatas(response) {
-
-
-
- }
+ function cantLoadInitialDatas(response) {}
};
@@ -147,22 +141,12 @@ app.controller('backupWebsiteControl', function($scope,$http,$timeout) {
if(response.data.fetchStatus == 1){
-
$scope.records = JSON.parse(response.data.data);
-
-
-
}
- else{
-
- }
-
- }
- function cantLoadInitialDatas(response) {
-
}
+ function cantLoadInitialDatas(response) {}
};
@@ -195,7 +179,7 @@ app.controller('backupWebsiteControl', function($scope,$http,$timeout) {
function ListInitialDatas(response) {
- if(response.data.metaStatus == 1){
+ if(response.data.metaStatus === 1){
getBackupStatus();
}
diff --git a/static/baseTemplate/assets/finalBase/finalBaseTheme.css b/static/baseTemplate/assets/finalBase/finalBaseTheme.css
index 576a7c732..e4f741d4d 100644
--- a/static/baseTemplate/assets/finalBase/finalBaseTheme.css
+++ b/static/baseTemplate/assets/finalBase/finalBaseTheme.css
@@ -8,7 +8,6 @@
@media (max-width:1050px){.info-box.icon-wrapper{padding-left:50px}.info-box.icon-wrapper .icon-large{font-size:70px}.info-box .stats{font-size:20px}.info-box b{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}@media screen and (max-width:650px){.heading-1 small,.messages-box li .messages-text{overflow:hidden;text-overflow:ellipsis}.mobile-hidden{display:none!important}.mobile-buttons a.btn{display:block;float:none;min-width:1px;max-width:100%;margin:0 0 5px}.heading-1 .heading-content{width:80%}.content-box .content-box-wrapper{padding:5px}.popover{min-width:100px!important}.medium-box,.scrollable-small{width:300px!important}.chat-box li{padding-right:50px}.chat-box li.float-left{padding-left:50px}.chat-box .popover .popover-content{font-size:11px;line-height:1.5em;padding:5px}.chat-box .chat-author img{width:34px;min-width:34px}.notifications-box li .notification-text{display:block;overflow:hidden;width:44%;white-space:nowrap;text-overflow:ellipsis}.notifications-box li .notification-time{margin:0}.messages-box li .messages-text{width:100%;white-space:nowrap}}
-@media only screen and (min-width:20em){#header-logo,#theme-options{display:none}#page-sidebar{transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);-webkit-transform:translateX(0);visibility:hidden}#page-content{margin-left:0}}@media only screen and (min-width:56.25em){#header-logo,#page-sidebar.collapse,#theme-options{display:block}#mobile-navigation{display:none}#page-sidebar{transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);-webkit-transform:translateX(0);visibility:visible}#page-content{margin-left:260px}}@media only screen and (max-width:760px){#cloud-btn,#header-nav-right #fullscreen-btn{display:none}}@media only screen and (max-width:630px){#page-header .user-account-btn>a.user-profile span{display:none}#page-header .user-account-btn .dropdown-menu:after,#page-header .user-account-btn .dropdown-menu:before{left:56px}}@media only screen and (max-width:545px){#header-nav-right #chatbox-btn{display:none}}@media only screen and (max-width:520px){#dashnav-btn,#page-header .user-account-btn>a.user-profile span{display:none}.popover{width:100%;border-radius:0}.box-md{width:auto}}@media only screen and (max-width:460px){.box-sm,.timeline-box .popover{width:auto}#page-content{padding:10px}#page-title{padding:10px 0 15px;text-align:center}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{margin-bottom:20px}.content-box{margin-top:0!important}.row.mrg20B{margin-bottom:0!important}#page-title p,#progress-btn,.dashboard-box .list-grade,.header-buttons-separator,.todo-box .bs-label,.todo-box .btn,.tooltip .tooltip-arrow{display:none}}@media only screen and (max-width:410px){#header-nav-right #logout-btn,#notifications-btn{display:none}#header-nav-left{float:right}#header-nav-right{margin-right:0;margin-left:15px;float:left}.dropdown-menu{position:fixed;left:0!important;width:100%;border-radius:0}#page-header .user-account-btn .dropdown-menu{top:65px}#page-header .user-account-btn .dropdown-menu:after,#page-header .user-account-btn .dropdown-menu:before{left:auto;right:24px}}
.c100:after,.c100>span{display:block;position:absolute}.clearfix:after,.dark-area{clear:both}.c100.p100 .slice,.c100.p51 .slice,.c100.p52 .slice,.c100.p53 .slice,.c100.p54 .slice,.c100.p55 .slice,.c100.p56 .slice,.c100.p57 .slice,.c100.p58 .slice,.c100.p59 .slice,.c100.p60 .slice,.c100.p61 .slice,.c100.p62 .slice,.c100.p63 .slice,.c100.p64 .slice,.c100.p65 .slice,.c100.p66 .slice,.c100.p67 .slice,.c100.p68 .slice,.c100.p69 .slice,.c100.p70 .slice,.c100.p71 .slice,.c100.p72 .slice,.c100.p73 .slice,.c100.p74 .slice,.c100.p75 .slice,.c100.p76 .slice,.c100.p77 .slice,.c100.p78 .slice,.c100.p79 .slice,.c100.p80 .slice,.c100.p81 .slice,.c100.p82 .slice,.c100.p83 .slice,.c100.p84 .slice,.c100.p85 .slice,.c100.p86 .slice,.c100.p87 .slice,.c100.p88 .slice,.c100.p89 .slice,.c100.p90 .slice,.c100.p91 .slice,.c100.p92 .slice,.c100.p93 .slice,.c100.p94 .slice,.c100.p95 .slice,.c100.p96 .slice,.c100.p97 .slice,.c100.p98 .slice,.c100.p99 .slice,.rect-auto{clip:rect(auto,auto,auto,auto)}.c100 .bar,.c100.p100 .fill,.c100.p51 .fill,.c100.p52 .fill,.c100.p53 .fill,.c100.p54 .fill,.c100.p55 .fill,.c100.p56 .fill,.c100.p57 .fill,.c100.p58 .fill,.c100.p59 .fill,.c100.p60 .fill,.c100.p61 .fill,.c100.p62 .fill,.c100.p63 .fill,.c100.p64 .fill,.c100.p65 .fill,.c100.p66 .fill,.c100.p67 .fill,.c100.p68 .fill,.c100.p69 .fill,.c100.p70 .fill,.c100.p71 .fill,.c100.p72 .fill,.c100.p73 .fill,.c100.p74 .fill,.c100.p75 .fill,.c100.p76 .fill,.c100.p77 .fill,.c100.p78 .fill,.c100.p79 .fill,.c100.p80 .fill,.c100.p81 .fill,.c100.p82 .fill,.c100.p83 .fill,.c100.p84 .fill,.c100.p85 .fill,.c100.p86 .fill,.c100.p87 .fill,.c100.p88 .fill,.c100.p89 .fill,.c100.p90 .fill,.c100.p91 .fill,.c100.p92 .fill,.c100.p93 .fill,.c100.p94 .fill,.c100.p95 .fill,.c100.p96 .fill,.c100.p97 .fill,.c100.p98 .fill,.c100.p99 .fill,.pie{position:absolute;border:.08em solid #307bbb;width:.84em;height:.84em;clip:rect(0,.5em,1em,0);-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;-webkit-transform:rotate(0);-moz-transform:rotate(0);-ms-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0)}.c100.p100 .bar:after,.c100.p100 .fill,.c100.p51 .bar:after,.c100.p51 .fill,.c100.p52 .bar:after,.c100.p52 .fill,.c100.p53 .bar:after,.c100.p53 .fill,.c100.p54 .bar:after,.c100.p54 .fill,.c100.p55 .bar:after,.c100.p55 .fill,.c100.p56 .bar:after,.c100.p56 .fill,.c100.p57 .bar:after,.c100.p57 .fill,.c100.p58 .bar:after,.c100.p58 .fill,.c100.p59 .bar:after,.c100.p59 .fill,.c100.p60 .bar:after,.c100.p60 .fill,.c100.p61 .bar:after,.c100.p61 .fill,.c100.p62 .bar:after,.c100.p62 .fill,.c100.p63 .bar:after,.c100.p63 .fill,.c100.p64 .bar:after,.c100.p64 .fill,.c100.p65 .bar:after,.c100.p65 .fill,.c100.p66 .bar:after,.c100.p66 .fill,.c100.p67 .bar:after,.c100.p67 .fill,.c100.p68 .bar:after,.c100.p68 .fill,.c100.p69 .bar:after,.c100.p69 .fill,.c100.p70 .bar:after,.c100.p70 .fill,.c100.p71 .bar:after,.c100.p71 .fill,.c100.p72 .bar:after,.c100.p72 .fill,.c100.p73 .bar:after,.c100.p73 .fill,.c100.p74 .bar:after,.c100.p74 .fill,.c100.p75 .bar:after,.c100.p75 .fill,.c100.p76 .bar:after,.c100.p76 .fill,.c100.p77 .bar:after,.c100.p77 .fill,.c100.p78 .bar:after,.c100.p78 .fill,.c100.p79 .bar:after,.c100.p79 .fill,.c100.p80 .bar:after,.c100.p80 .fill,.c100.p81 .bar:after,.c100.p81 .fill,.c100.p82 .bar:after,.c100.p82 .fill,.c100.p83 .bar:after,.c100.p83 .fill,.c100.p84 .bar:after,.c100.p84 .fill,.c100.p85 .bar:after,.c100.p85 .fill,.c100.p86 .bar:after,.c100.p86 .fill,.c100.p87 .bar:after,.c100.p87 .fill,.c100.p88 .bar:after,.c100.p88 .fill,.c100.p89 .bar:after,.c100.p89 .fill,.c100.p90 .bar:after,.c100.p90 .fill,.c100.p91 .bar:after,.c100.p91 .fill,.c100.p92 .bar:after,.c100.p92 .fill,.c100.p93 .bar:after,.c100.p93 .fill,.c100.p94 .bar:after,.c100.p94 .fill,.c100.p95 .bar:after,.c100.p95 .fill,.c100.p96 .bar:after,.c100.p96 .fill,.c100.p97 .bar:after,.c100.p97 .fill,.c100.p98 .bar:after,.c100.p98 .fill,.c100.p99 .bar:after,.c100.p99 .fill,.pie-fill{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.c100{position:relative;font-size:120px;width:1em;height:1em;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;float:left;margin:0 .1em .1em 0;background-color:#ccc}.c100 *,.c100 :after,.c100 :before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.c100.center{float:none;margin:0 auto}.c100.big{font-size:240px}.c100.small{font-size:80px}.c100>span{z-index:1;left:0;top:0;width:5em;line-height:5em;font-size:.2em;color:#ccc;text-align:center;white-space:nowrap;-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;transition-property:all;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:ease-out;-moz-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.c100:after{top:.08em;left:.08em;content:" ";-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;background-color:#f5f5f5;width:.84em;height:.84em;-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;transition-property:all;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:ease-in;-moz-transition-timing-function:ease-in;-o-transition-timing-function:ease-in;transition-timing-function:ease-in}.c100 .slice{position:absolute;width:1em;height:1em;clip:rect(0,1em,1em,.5em)}.c100:hover{cursor:default}.c100:hover>span{width:3.33em;line-height:3.33em;font-size:.3em;color:#307bbb}.c100:hover:after{top:.04em;left:.04em;width:.92em;height:.92em}.c100.dark{background-color:#777}.c100.dark:after,.dark-area{background-color:#666}.c100.dark .bar,.c100.dark .fill{border-color:#c6ff00!important}.c100.green .bar,.c100.green .fill,.c100.green.dark .bar,.c100.green.dark .fill{border-color:#2ecc71!important}.c100.dark>span{color:#777}.c100.dark:hover>span{color:#c6ff00}.c100.green.dark:hover>span,.c100.green:hover>span{color:#2ecc71}.c100.orange .bar,.c100.orange .fill{border-color:#dd9d22!important}.c100.orange:hover>span{color:#dd9d22}.c100.orange.dark .bar,.c100.orange.dark .fill{border-color:#e08833!important}.c100.pink .bar,.c100.pink .fill,.c100.pink.dark .bar,.c100.pink.dark .fill{border-color:#ff8e8e!important}.c100.orange.dark:hover>span{color:#e08833}.c100.pink.dark:hover>span,.c100.pink:hover>span{color:#ff8e8e}.c100.red .bar,.c100.red .fill,.c100.red.dark .bar,.c100.red.dark .fill{border-color:#ff5757!important}.c100.red.dark:hover>span,.c100.red:hover>span{color:#ff5757}.dark-area{padding:40px;margin:0 -40px 20px}.clearfix:after,.clearfix:before{content:" ";display:table}@media only screen and (min-width:800px){.progress-center{padding-left:30%}}@media only screen and (max-width:800px){.progress-center{padding-left:32%}.custom-padding{padding-left:7%;padding-bottom:2%}}@media only screen and (max-width:400px){.progress-center{padding-left:30%}.custom-padding{padding-left:7%;padding-bottom:2%}}@-moz-keyframes fill{0%{height:0%}60%{height:110%}70%{height:95%}80%{height:105%}100%{height:100%}}@-webkit-keyframes fill{0%{height:0%}60%{height:110%}70%{height:95%}80%{height:105%}100%{height:100%}}@keyframes fill{0%{height:0%}60%{height:110%}70%{height:95%}80%{height:105%}100%{height:100%}}.box{width:200px;height:120px;position:relative;display:inline-block}.box .container,.box .fill{width:100%;height:100%;position:absolute;bottom:0}.box .container{box-sizing:border-box;z-index:3;text-align:center;color:#fff;font-size:14px;padding-top:15px}.box .container .number{font-size:30px;margin-top:25px}.box .fill{z-index:2;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.box .fill.speed1{-moz-animation:fill 1s ease-out;-webkit-animation:fill 1s ease-out;animation:fill 1s ease-out}.box .fill.speed2{-moz-animation:fill 1.1s ease-out;-webkit-animation:fill 1.1s ease-out;animation:fill 1.1s ease-out}.box .fill.speed3{-moz-animation:fill 1.2s ease-out;-webkit-animation:fill 1.2s ease-out;animation:fill 1.2s ease-out}.box .fill.speed4{-moz-animation:fill 1.3s ease-out;-webkit-animation:fill 1.3s ease-out;animation:fill 1.3s ease-out}.hide-on-phone{display:none}
diff --git a/static/baseTemplate/assets/themes/admin/color-schemes/default.css b/static/baseTemplate/assets/themes/admin/color-schemes/default.css
index 03178e748..b7810574d 100644
--- a/static/baseTemplate/assets/themes/admin/color-schemes/default.css
+++ b/static/baseTemplate/assets/themes/admin/color-schemes/default.css
@@ -129,4 +129,9 @@ h1, h2, h3, h4, h5, h6,
}
#page-sidebar.font-inverse #sidebar-menu li .sidebar-submenu ul li a:hover {
background: rgba(255,255,255,0.05);
-}
\ No newline at end of file
+}
+
+
+/* Admin responsive */
+
+@media only screen and (min-width:20em){#header-logo,#theme-options{display:none}#page-sidebar{transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);-webkit-transform:translateX(0);visibility:hidden}#page-content{margin-left:0}}@media only screen and (min-width:56.25em){#header-logo,#page-sidebar.collapse,#theme-options{display:block}#mobile-navigation{display:none}#page-sidebar{transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);-webkit-transform:translateX(0);visibility:visible}#page-content{margin-left:260px}}@media only screen and (max-width:760px){#cloud-btn,#header-nav-right #fullscreen-btn{display:none}}@media only screen and (max-width:630px){#page-header .user-account-btn>a.user-profile span{display:none}#page-header .user-account-btn .dropdown-menu:after,#page-header .user-account-btn .dropdown-menu:before{left:56px}}@media only screen and (max-width:545px){#header-nav-right #chatbox-btn{display:none}}@media only screen and (max-width:520px){#dashnav-btn,#page-header .user-account-btn>a.user-profile span{display:none}.popover{width:100%;border-radius:0}.box-md{width:auto}}@media only screen and (max-width:460px){.box-sm,.timeline-box .popover{width:auto}#page-content{padding:10px}#page-title{padding:10px 0 15px;text-align:center}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{margin-bottom:20px}.content-box{margin-top:0!important}.row.mrg20B{margin-bottom:0!important}#page-title p,#progress-btn,.dashboard-box .list-grade,.header-buttons-separator,.todo-box .bs-label,.todo-box .btn,.tooltip .tooltip-arrow{display:none}}@media only screen and (max-width:410px){#header-nav-right #logout-btn,#notifications-btn{display:none}#header-nav-left{float:right}#header-nav-right{margin-right:0;margin-left:15px;float:left}.dropdown-menu{position:fixed;left:0!important;width:100%;border-radius:0}#page-header .user-account-btn .dropdown-menu{top:65px}#page-header .user-account-btn .dropdown-menu:after,#page-header .user-account-btn .dropdown-menu:before{left:auto;right:24px}}
\ No newline at end of file
diff --git a/websiteFunctions/views.py b/websiteFunctions/views.py
index 40afc6129..c46851e6a 100644
--- a/websiteFunctions/views.py
+++ b/websiteFunctions/views.py
@@ -648,8 +648,6 @@ def submitWebsiteDeletion(request):
execPath = execPath + " deleteVirtualHostConfigurations --virtualHostName "+ websiteName+" --numberOfSites "+numberOfWebsites
-
-
subprocess.check_output(shlex.split(execPath))
delWebsite = Websites.objects.get(domain=websiteName)
@@ -682,6 +680,11 @@ def submitWebsiteDeletion(request):
installUtilities.reStartLiteSpeed()
+ ## Delete mail accounts
+
+ command = "sudo rm -rf /home/vmail/" + websiteName
+ subprocess.call(shlex.split(command))
+
data_ret = {'websiteDeleteStatus': 1,'error_message': "None"}
json_data = json.dumps(data_ret)