mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 13:25:51 +01:00
some changes to git configration file
This commit is contained in:
@@ -130,6 +130,15 @@ class mysqlUtilities:
|
|||||||
def deleteDatabase(dbname, dbuser):
|
def deleteDatabase(dbname, dbuser):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
## Remove possible git folder
|
||||||
|
|
||||||
|
dbPath = '/var/lib/mysql/%s/.git' % (dbname)
|
||||||
|
|
||||||
|
command = 'rm -rf %s' % (dbPath)
|
||||||
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
connection, cursor = mysqlUtilities.setupConnection()
|
connection, cursor = mysqlUtilities.setupConnection()
|
||||||
|
|
||||||
if connection == 0:
|
if connection == 0:
|
||||||
|
|||||||
@@ -3005,8 +3005,16 @@ StrictHostKeyChecking no
|
|||||||
gitConfFolder = '/home/cyberpanel/git'
|
gitConfFolder = '/home/cyberpanel/git'
|
||||||
gitConFile = '%s/%s' % (gitConfFolder, self.domain)
|
gitConFile = '%s/%s' % (gitConfFolder, self.domain)
|
||||||
|
|
||||||
if os.path.exists(gitConFile):
|
if not os.path.exists(gitConfFolder):
|
||||||
gitConf = json.loads(open(gitConFile, 'r').read())
|
os.mkdir(gitConfFolder)
|
||||||
|
|
||||||
|
if not os.path.exists(gitConFile):
|
||||||
|
os.mkdir(gitConFile)
|
||||||
|
|
||||||
|
finalFile = '%s/%s' % (gitConFile, self.folder.split('/')[-1])
|
||||||
|
|
||||||
|
if os.path.exists(finalFile):
|
||||||
|
gitConf = json.loads(open(finalFile, 'r').read())
|
||||||
|
|
||||||
autoCommitCurrent = gitConf['autoCommit']
|
autoCommitCurrent = gitConf['autoCommit']
|
||||||
autoPushCurrent = gitConf['autoPush']
|
autoPushCurrent = gitConf['autoPush']
|
||||||
@@ -3820,7 +3828,12 @@ StrictHostKeyChecking no
|
|||||||
if not os.path.exists(gitConfFolder):
|
if not os.path.exists(gitConfFolder):
|
||||||
os.mkdir(gitConfFolder)
|
os.mkdir(gitConfFolder)
|
||||||
|
|
||||||
writeToFile = open(gitConFile, 'w')
|
if not os.path.exists(gitConFile):
|
||||||
|
os.mkdir(gitConFile)
|
||||||
|
|
||||||
|
finalFile = '%s/%s' % (gitConFile, self.folder.split('/')[-1])
|
||||||
|
|
||||||
|
writeToFile = open(finalFile, 'w')
|
||||||
writeToFile.write(json.dumps(dic))
|
writeToFile.write(json.dumps(dic))
|
||||||
writeToFile.close()
|
writeToFile.close()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user