mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
setup service manager to install applications
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import subprocess, shlex
|
||||
from random import randint
|
||||
from plogical.processUtilities import ProcessUtilities
|
||||
from dns.models import Supermasters
|
||||
from manageServices.models import SlaveServers
|
||||
import argparse
|
||||
from serverStatus.serverStatusUtil import ServerStatusUtil
|
||||
|
||||
class ServiceManager:
|
||||
|
||||
@@ -125,3 +126,27 @@ superslave=yes
|
||||
|
||||
Supermasters(ip=self.extraArgs['masterServerIP'], nameserver=self.extraArgs['slaveServerNS'], account='').save()
|
||||
|
||||
@staticmethod
|
||||
def installElasticSearch():
|
||||
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
|
||||
"Packages successfully installed.[200]\n", 1)
|
||||
return 0
|
||||
|
||||
def main():
|
||||
|
||||
parser = argparse.ArgumentParser(description='CyberPanel Application Manager')
|
||||
parser.add_argument('--function', help='Function')
|
||||
|
||||
|
||||
args = vars(parser.parse_args())
|
||||
|
||||
if args["function"] == "InstallElasticSearch":
|
||||
ServiceManager.InstallElasticSearch()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user