mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
allow cp port change, ref: https://feedback.cyberpanel.net/b/requests/p/change-port-change-default-username-add-recaptcha-in-login-page-or-change-url-login-page
This commit is contained in:
@@ -19,6 +19,7 @@ class ProcessUtilities(multi.Thread):
|
||||
ubuntu20 = 3
|
||||
server_address = '/usr/local/lscpd/admin/comm.sock'
|
||||
token = "unset"
|
||||
portPath = '/usr/local/lscp/conf/bind.conf'
|
||||
|
||||
def __init__(self, function, extraArgs):
|
||||
multi.Thread.__init__(self)
|
||||
@@ -32,6 +33,16 @@ class ProcessUtilities(multi.Thread):
|
||||
except BaseException as msg:
|
||||
logging.writeToFile( str(msg) + ' [ApplicationInstaller.run]')
|
||||
|
||||
@staticmethod
|
||||
def fetchCurrentPort():
|
||||
command = 'cat %s' % (ProcessUtilities.portPath)
|
||||
port = ProcessUtilities.outputExecutioner(command)
|
||||
|
||||
if port.find('*') > -1:
|
||||
return port.split(':')[1].rstrip('\n')
|
||||
else:
|
||||
return '8090'
|
||||
|
||||
@staticmethod
|
||||
def getLitespeedProcessNumber():
|
||||
finalListOfProcesses = []
|
||||
|
||||
Reference in New Issue
Block a user