mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-27 17:00:45 +01:00
Minor bug fixes to Cron.
This commit is contained in:
Binary file not shown.
@@ -102,7 +102,7 @@ DATABASES = {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'cyberpanel',
|
||||
'USER': 'cyberpanel',
|
||||
'PASSWORD': 'YhGk1hGnOcWwJl',
|
||||
'PASSWORD': 'jFzZwX3fFyYrCo',
|
||||
'HOST': '127.0.0.1',
|
||||
'PORT':'3307'
|
||||
},
|
||||
@@ -110,7 +110,7 @@ DATABASES = {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'mysql',
|
||||
'USER': 'root',
|
||||
'PASSWORD': '8oUlBn5AmS8RuY',
|
||||
'PASSWORD': 'b1w3wHi5x0o8t9',
|
||||
'HOST': 'localhost',
|
||||
'PORT': '',
|
||||
}
|
||||
|
||||
Binary file not shown.
BIN
CyberCP/urls.pyc
BIN
CyberCP/urls.pyc
Binary file not shown.
BIN
CyberCP/wsgi.pyc
BIN
CyberCP/wsgi.pyc
Binary file not shown.
BIN
api/__init__.pyc
BIN
api/__init__.pyc
Binary file not shown.
BIN
api/admin.pyc
BIN
api/admin.pyc
Binary file not shown.
Binary file not shown.
BIN
api/models.pyc
BIN
api/models.pyc
Binary file not shown.
BIN
api/urls.pyc
BIN
api/urls.pyc
Binary file not shown.
BIN
api/views.pyc
BIN
api/views.pyc
Binary file not shown.
Binary file not shown.
BIN
backup/admin.pyc
BIN
backup/admin.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
backup/urls.pyc
BIN
backup/urls.pyc
Binary file not shown.
BIN
backup/views.pyc
BIN
backup/views.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
dns/__init__.pyc
BIN
dns/__init__.pyc
Binary file not shown.
BIN
dns/admin.pyc
BIN
dns/admin.pyc
Binary file not shown.
Binary file not shown.
BIN
dns/models.pyc
BIN
dns/models.pyc
Binary file not shown.
BIN
dns/urls.pyc
BIN
dns/urls.pyc
Binary file not shown.
BIN
dns/views.pyc
BIN
dns/views.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ftp/__init__.pyc
BIN
ftp/__init__.pyc
Binary file not shown.
BIN
ftp/admin.pyc
BIN
ftp/admin.pyc
Binary file not shown.
Binary file not shown.
BIN
ftp/models.pyc
BIN
ftp/models.pyc
Binary file not shown.
BIN
ftp/urls.pyc
BIN
ftp/urls.pyc
Binary file not shown.
BIN
ftp/views.pyc
BIN
ftp/views.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
class CyberCPLogFileWriter:
|
||||
fileName = "/home/cyberpanel.net/public_html/hello.txt"
|
||||
|
||||
@staticmethod
|
||||
def writeToFile(message):
|
||||
try:
|
||||
file = open(CyberCPLogFileWriter.fileName,'a')
|
||||
file.writelines("[" + time.strftime(
|
||||
"%I-%M-%S-%a-%b-%Y") + "] "+ message + "\n")
|
||||
file.close()
|
||||
except IOError,msg:
|
||||
return "Can not write to error file."
|
||||
|
||||
@staticmethod
|
||||
def readLastNFiles(numberOfLines,fileName):
|
||||
try:
|
||||
|
||||
lastFewLines = subprocess.check_output(["tail", "-n",str(numberOfLines),fileName])
|
||||
|
||||
return lastFewLines
|
||||
|
||||
except subprocess.CalledProcessError,msg:
|
||||
return "File was empty"
|
||||
|
||||
|
||||
CyberCPLogFileWriter.writeToFile("Hello")
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user