From ff840fb7bbc69fc09d869974c49ed18a4f07a30f Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Sat, 11 Jan 2020 18:31:18 +0500 Subject: [PATCH] install redis --- install/install.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/install/install.py b/install/install.py index b055d18bf..56df7e26f 100755 --- a/install/install.py +++ b/install/install.py @@ -2173,6 +2173,22 @@ service_port = 9000 command = '/root/.acme.sh/acme.sh --upgrade --auto-upgrade' preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + def installRedis(self): + if self.distro == ubuntu: + command = 'apt install redis-server -y' + elif self.distro == centos: + command = 'yum install redis -y' + else: + command = 'dnf install redis -y' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = 'systemctl start redis' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + command = 'systemctl enable redis' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + + def main(): @@ -2185,6 +2201,7 @@ def main(): parser.add_argument('--ent', help='Install LS Ent or OpenLiteSpeed') parser.add_argument('--serial', help='Install LS Ent or OpenLiteSpeed') parser.add_argument('--port', help='LSCPD Port') + parser.add_argument('--redis', help='vHosts on Redis - Requires LiteSpeed Enterprise') args = parser.parse_args() logging.InstallLog.writeToFile("Starting CyberPanel installation..") @@ -2320,6 +2337,9 @@ def main(): preFlightsChecks.stdOut("Pure-FTPD will be installed and enabled.") checks.enableDisableFTP('on', distro) + if args.redis != None: + checks.installRedis() + checks.installCLScripts() logging.InstallLog.writeToFile("CyberPanel installation successfully completed!")