Skip to content

Commit

Permalink
Fix Dates. Improve CSF integration. Fix Typos
Browse files Browse the repository at this point in the history
  • Loading branch information
meramsey committed Oct 8, 2019
1 parent 99c0c5a commit 2584834
Show file tree
Hide file tree
Showing 41 changed files with 379 additions and 108 deletions.
6 changes: 3 additions & 3 deletions IncBackups/IncBackupsControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
pass
import threading as multi
from plogical.processUtilities import ProcessUtilities
from IncBackups.models import IncJob, JobSnapshots
from models import IncJob, JobSnapshots
from websiteFunctions.models import Websites
import plogical.randomPassword as randomPassword
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
Expand Down Expand Up @@ -316,7 +316,7 @@ def prettify(elem):
reparsed = minidom.parseString(rough_string)
return reparsed.toprettyxml(indent=" ")

## /home/example.com/backup/backup-example-06-50-03-Thu-Feb-2018/meta.xml -- metaPath
## /home/example.com/backup/backup-example.com-02.13.2018_10-24-52/meta.xml -- metaPath

metaPath = '/home/cyberpanel/%s' % (str(randint(1000, 9999)))

Expand Down Expand Up @@ -538,4 +538,4 @@ def createBackup(self):
except:
pass

logging.statusWriter(self.statusPath, 'Completed', 1)
logging.statusWriter(self.statusPath, 'Completed', 1)
2 changes: 1 addition & 1 deletion IncBackups/static/IncBackups/IncBackups.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,4 +491,4 @@ app.controller('incrementalDestinations', function ($scope, $http) {
};


});
});
Empty file modified IncBackups/templates/IncBackups/createBackup.html
100755 → 100644
Empty file.
6 changes: 3 additions & 3 deletions backup/backupManager.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ def submitBackupCreation(self, userID = None, data = None):

## /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")
backupDomainName = data['websiteToBeBacked']

This comment has been minimized.

Copy link
@meramsey

meramsey Oct 10, 2019

Author Contributor

Original credit for this idea should be attributed to @minhazulOO7

#109

backupName = 'backup-' + backupDomainName + "-" + time.strftime("%m.%d.%Y_%H-%M-%S")

## /home/example.com/backup/backup-example-06-50-03-Thu-Feb-2018
## /home/example.com/backup/backup-example.com-02.13.2018_10-24-52
tempStoragePath = os.path.join(backupPath, backupName)


Expand Down
Empty file modified baseTemplate/templates/baseTemplate/index.html
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion cli/cliLogger.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def writeforCLI(message, level, method):
try:
file = open(cliLogger.fileName, 'a')
file.writelines("[" + time.strftime(
"%I-%M-%S-%a-%b-%Y") + "] [" + level + ":" + method + "] " + message + "\n")
"%m.%d.%Y_%H-%M-%S") + "] [" + level + ":" + method + "] " + message + "\n")
file.close()
file.close()
except IOError:
Expand Down
Empty file modified emailPremium/templates/emailPremium/emailPage.html
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion emailPremium/templates/emailPremium/listDomains.html
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="container">

<div id="page-title">
<h2 id="domainNamePage">{% trans "List Domains" %} - <a target="_blank" href="http://go.cyberpanel.net/emailLimits" style="height: 23px;line-height: 21px;" class="btn btn-border btn-alt border-red btn-link font-red" title=""><span>{% trans "Emai Limits Docs" %}</span></a></h2>
<h2 id="domainNamePage">{% trans "List Domains" %} - <a target="_blank" href="http://go.cyberpanel.net/emailLimits" style="height: 23px;line-height: 21px;" class="btn btn-border btn-alt border-red btn-link font-red" title=""><span>{% trans "Email Limits Docs" %}</span></a></h2>
<p>{% trans "On this page you manage emails limits for Domains/Email Addresses" %}</p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion emailPremium/templates/emailPremium/policyServer.html
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<div class="container">
<div id="page-title">
<h2>{% trans "Email Policy Server Configurations!" %} - <a target="_blank" href="http://go.cyberpanel.net/emailLimits" style="height: 23px;line-height: 21px;" class="btn btn-border btn-alt border-red btn-link font-red" title=""><span>{% trans "Emai Limits Docs" %}</span></a> </h2>
<h2>{% trans "Email Policy Server Configurations!" %} - <a target="_blank" href="http://go.cyberpanel.net/emailLimits" style="height: 23px;line-height: 21px;" class="btn btn-border btn-alt border-red btn-link font-red" title=""><span>{% trans "Email Limits Docs" %}</span></a> </h2>
<p>{% trans "Turn ON Email Policy Server to use Email Limits Feature. " %}</p>
</div>

Expand Down
46 changes: 46 additions & 0 deletions firewall/templates/firewall/index.html
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,52 @@ <h3 class="content-box-header">
</a>
</div>

<div class="col-lg-5 col-md-6 btn-min-width">
<a href="{% url 'csf' %}" title="{% trans 'ConfigServer Security & Firewall (CSF)' %}" class="tile-box tile-box-shortcut btn-primary">
<div class="tile-header">
{% trans "CSF" %}
</div>
<div class="tile-content-wrapper">
<i class="fa fa-lock"></i>
</div>
</a>
</div>

<div class="col-lg-5 col-md-6 btn-min-width">
<a href="{% url 'modSecurity' %}" title="{% trans 'ModSecurity Configurations' %}" class="tile-box tile-box-shortcut btn-primary">
<div class="tile-header">
{% trans "ModSecurity Conf" %}
</div>
<div class="tile-content-wrapper">
<i class="fa fa-lock"></i>
</div>
</a>
</div>

<div class="col-lg-5 col-md-6 btn-min-width">
<a href="{% url 'modSecRules' %}" title="{% trans 'ModSecurity Rules' %}" class="tile-box tile-box-shortcut btn-primary">
<div class="tile-header">
{% trans "ModSecurity Rules" %}
</div>
<div class="tile-content-wrapper">
<i class="fa fa-lock"></i>
</div>
</a>
</div>

<div class="col-lg-5 col-md-6 btn-min-width">
<a href="{% url 'modSecRulesPacks' %}" title="{% trans 'ModSecurity Rules Packs' %}" class="tile-box tile-box-shortcut btn-primary">
<div class="tile-header">
{% trans "ModSecurity Rules Packs" %}
</div>
<div class="tile-content-wrapper">
<i class="fa fa-lock"></i>
</div>
</a>
</div>




</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions install/install.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ def __init__(self, rootPath, ip, path, cwd, cyberPanelPath, distro):
def stdOut(message, log=0, do_exit=0, code=os.EX_OK):
print("\n\n")
print ("[" + time.strftime(
"%I-%M-%S-%a-%b-%Y") + "] #########################################################################\n")
print("[" + time.strftime("%I-%M-%S-%a-%b-%Y") + "] " + message + "\n")
"%m.%d.%Y_%H-%M-%S") + "] #########################################################################\n")
print("[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] " + message + "\n")
print ("[" + time.strftime(
"%I-%M-%S-%a-%b-%Y") + "] #########################################################################\n")
"%m.%d.%Y_%H-%M-%S") + "] #########################################################################\n")

if log:
logging.InstallLog.writeToFile(message)
Expand Down Expand Up @@ -575,7 +575,7 @@ def install_python_setup_tools(self):
if preFlightsChecks.resFailed(self.distro, res):
count = count + 1
print("[" + time.strftime(
"%I-%M-%S-%a-%b-%Y") + "] " + "Unable to install Python setup tools, trying again, try number: " + str(
"%m.%d.%Y_%H-%M-%S") + "] " + "Unable to install Python setup tools, trying again, try number: " + str(
count) + "\n")
if count == 3:
logging.InstallLog.writeToFile(
Expand All @@ -584,7 +584,7 @@ def install_python_setup_tools(self):
os._exit(0)
else:
logging.InstallLog.writeToFile("Python setup tools Successfully installed!")
print("[" + time.strftime("%I-%M-%S-%a-%b-%Y") + "] " + "Python setup tools Successfully installed!")
print("[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] " + "Python setup tools Successfully installed!")
break

def install_python_requests(self):
Expand Down Expand Up @@ -2349,7 +2349,7 @@ def downoad_and_install_raindloop(self):
else:
logging.InstallLog.writeToFile("Rainloop permissions changed!")
print(
"[" + time.strftime("%I-%M-%S-%a-%b-%Y") + "] " + "Rainloop permissions changed!")
"[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] " + "Rainloop permissions changed!")
break

#############
Expand Down
2 changes: 1 addition & 1 deletion install/installLog.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ class InstallLog:
def writeToFile(message):
file = open(InstallLog.fileName,'a')
file.writelines("[" + time.strftime(
"%I-%M-%S-%a-%b-%Y") + "] "+message + "\n")
"%m.%d.%Y_%H-%M-%S") + "] "+message + "\n")
file.close()
2 changes: 1 addition & 1 deletion locale/br/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3692,7 +3692,7 @@ msgstr "SpamAssassin конфигурация е успешно променен
#: emailPremium/templates/emailPremium/emailPage.html:13
#: emailPremium/templates/emailPremium/listDomains.html:14
#: emailPremium/templates/emailPremium/policyServer.html:13
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Email лимити документация"

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/bs/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3835,7 +3835,7 @@ msgstr " uspješno je kreiran."
#: emailPremium/templates/emailPremium/policyServer.html:13
#, fuzzy
#| msgid "Email Logs"
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Email logovi"

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/cn/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3773,7 +3773,7 @@ msgstr " 已成功创建."
#: emailPremium/templates/emailPremium/policyServer.html:13
#, fuzzy
#| msgid "Email Logs"
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Email日志"

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3780,7 +3780,7 @@ msgstr ""
#: emailPremium/templates/emailPremium/emailPage.html:13
#: emailPremium/templates/emailPremium/listDomains.html:14
#: emailPremium/templates/emailPremium/policyServer.html:13
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr ""

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3706,7 +3706,7 @@ msgstr "Les configurations de SpamAssassin ont été enregistrées avec succès.
#: emailPremium/templates/emailPremium/emailPage.html:13
#: emailPremium/templates/emailPremium/listDomains.html:14
#: emailPremium/templates/emailPremium/policyServer.html:13
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Limites de messagerie documentations"

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/gr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3848,7 +3848,7 @@ msgstr "δημιουργήθηκε με επιτυχία."
#: emailPremium/templates/emailPremium/policyServer.html:13
#, fuzzy
#| msgid "Email Logs"
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Αρχεία καταγραφής Email "

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/id/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3437,7 +3437,7 @@ msgstr ""
#: emailPremium/templates/emailPremium/emailPage.html:13
#: emailPremium/templates/emailPremium/listDomains.html:14
#: emailPremium/templates/emailPremium/policyServer.html:13
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr ""

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/it/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3803,7 +3803,7 @@ msgstr "Le configurazioni di SpamAssassin sono state salvate correttamente."
#: emailPremium/templates/emailPremium/policyServer.html:13
#, fuzzy
#| msgid "Email Logs"
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Documentazione Limiti Email"

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/ja/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3682,7 +3682,7 @@ msgstr "SpamAssassin 設定が保存されました。"
#: emailPremium/templates/emailPremium/emailPage.html:13
#: emailPremium/templates/emailPremium/listDomains.html:14
#: emailPremium/templates/emailPremium/policyServer.html:13
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Eメールの制限ドキュメント"

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/pl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3676,7 +3676,7 @@ msgstr "Pomyślnie zapisano konfigurację SpamAssassin."
#: emailPremium/templates/emailPremium/emailPage.html:13
#: emailPremium/templates/emailPremium/listDomains.html:14
#: emailPremium/templates/emailPremium/policyServer.html:13
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Limity poczty dokumentacja"

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/pt/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3845,7 +3845,7 @@ msgstr " foi criado com sucesso."
#: emailPremium/templates/emailPremium/policyServer.html:13
#, fuzzy
#| msgid "Email Logs"
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Logs de E-Mail"

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/ru/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3801,7 +3801,7 @@ msgstr "Успешно запущен процесс резервного коп
#: emailPremium/templates/emailPremium/policyServer.html:13
#, fuzzy
#| msgid "Email Logs"
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Лог-журнал Эл.почты"

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/tr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3775,7 +3775,7 @@ msgstr "Yedekleme işlemi başarıyla başlatıldı."
#: emailPremium/templates/emailPremium/policyServer.html:13
#, fuzzy
#| msgid "Email Logs"
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Eposta günlükleri"

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion locale/vi/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3674,7 +3674,7 @@ msgstr "Đã lưu thành công cấu hình SpamAssassin."
#: emailPremium/templates/emailPremium/emailPage.html:13
#: emailPremium/templates/emailPremium/listDomains.html:14
#: emailPremium/templates/emailPremium/policyServer.html:13
msgid "Emai Limits Docs"
msgid "Email Limits Docs"
msgstr "Tài liệu giới hạn Emai"

#: emailPremium/templates/emailPremium/emailLimits.html:14
Expand Down
2 changes: 1 addition & 1 deletion loginSystem/templates/loginSystem/login.html
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<div class="col-md-8 col-lg-6 clearfix center-margin">
<div class="row">
<div class="col-md-5">
<h3 class="text-transform-upr font-size-17">CyberPanel <span class="opacity-80">v 1.8</span></h3>
<h3 class="text-transform-upr font-size-17">CyberPanel <span class="opacity-80">v 1.9</span></h3>
<p class="font-gray">Web Hosting Control Panel</p>
<div class="divider"></div>
<ul class="reset-ul">
Expand Down
4 changes: 2 additions & 2 deletions plogical/CyberCPLogFileWriter.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def writeToFile(message):
try:
file = open(CyberCPLogFileWriter.fileName,'a')
file.writelines("[" + time.strftime(
"%I-%M-%S-%a-%b-%Y") + "] "+ message + "\n")
"%m.%d.%Y_%H-%M-%S") + "] "+ message + "\n")
file.close()

except IOError,msg:
Expand All @@ -21,7 +21,7 @@ def writeforCLI(message, level, method):
try:
file = open(CyberCPLogFileWriter.fileName, 'a')
file.writelines("[" + time.strftime(
"%I-%M-%S-%a-%b-%Y") + "] [" + level + ":" + method + "] " + message + "\n")
"%m.%d.%Y_%H-%M-%S") + "] [" + level + ":" + method + "] " + message + "\n")
file.close()
file.close()
except IOError:
Expand Down
8 changes: 4 additions & 4 deletions plogical/backupSchedule.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class backupSchedule:
def remoteBackupLogging(fileName, message):
try:
file = open(fileName,'a')
file.writelines("[" + time.strftime("%I-%M-%S-%a-%b-%Y") + "] "+ message + "\n")
print ("[" + time.strftime("%I-%M-%S-%a-%b-%Y") + "] "+ message + "\n")
file.writelines("[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] "+ message + "\n")
print ("[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] "+ message + "\n")
file.close()
except IOError,msg:
return "Can not write to error file."
Expand Down Expand Up @@ -192,10 +192,10 @@ def prepare():
try:
destinations = backupUtilities.destinationsPath

backupLogPath = "/usr/local/lscp/logs/backup_log."+time.strftime("%I-%M-%S-%a-%b-%Y")
backupLogPath = "/usr/local/lscp/logs/backup_log."+time.strftime("%m.%d.%Y_%H-%M-%S")

backupSchedule.remoteBackupLogging(backupLogPath,"#################################################")
backupSchedule.remoteBackupLogging(backupLogPath," Backup log for: " +time.strftime("%I-%M-%S-%a-%b-%Y"))
backupSchedule.remoteBackupLogging(backupLogPath," Backup log for: " +time.strftime("%m.%d.%Y_%H-%M-%S"))
backupSchedule.remoteBackupLogging(backupLogPath,"#################################################\n")

backupSchedule.remoteBackupLogging(backupLogPath, "")
Expand Down
4 changes: 2 additions & 2 deletions plogical/backupScheduleLocal.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ class backupScheduleLocal:
@staticmethod
def prepare():
try:
backupLogPath = "/usr/local/lscp/logs/local_backup_log." + time.strftime("%I-%M-%S-%a-%b-%Y")
backupLogPath = "/usr/local/lscp/logs/local_backup_log." + time.strftime("%m.%d.%Y_%H-%M-%S")

writeToFile = open(backupLogPath, "a")

backupSchedule.remoteBackupLogging(backupLogPath, "#################################################")
backupSchedule.remoteBackupLogging(backupLogPath," Local Backup log for: " + time.strftime("%I-%M-%S-%a-%b-%Y"))
backupSchedule.remoteBackupLogging(backupLogPath," Local Backup log for: " + time.strftime("%m.%d.%Y_%H-%M-%S"))
backupSchedule.remoteBackupLogging(backupLogPath, "#################################################\n")