Minor bug fixes to Cron.

This commit is contained in:
usmannasir 2018-03-02 18:13:26 +05:00
parent 0beb91dbd0
commit a0633eddc2
141 changed files with 608 additions and 575 deletions

Binary file not shown.

View File

@ -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.

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.

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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