From 386f8dfdcd1a103aa288bb7266240013ce04369c Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 2 Feb 2021 12:49:08 +0500 Subject: [PATCH] install default plugins set --- plogical/applicationInstaller.py | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/plogical/applicationInstaller.py b/plogical/applicationInstaller.py index dd068d90c..7450c22f0 100755 --- a/plogical/applicationInstaller.py +++ b/plogical/applicationInstaller.py @@ -645,6 +645,46 @@ $parameters = array( except: pass + try: + if self.extraArgs['appsSet'] == 'WordPress + LSCache + Classic Editor': + + command = "wp plugin install classic-editor --allow-root --path=" + finalPath + result = ProcessUtilities.outputExecutioner(command, externalApp) + + if result.find('Success:') == -1: + raise BaseException(result) + + statusFile = open(tempStatusPath, 'w') + statusFile.writelines('Activating Classic Editor Plugin,90') + statusFile.close() + + command = "wp plugin activate classic-editor --allow-root --path=" + finalPath + result = ProcessUtilities.outputExecutioner(command, externalApp) + + if result.find('Success:') == -1: + raise BaseException(result) + + elif self.extraArgs['appsSet'] == 'WordPress + LSCache + WooCommerce': + + command = "wp plugin install woocommerce --allow-root --path=" + finalPath + result = ProcessUtilities.outputExecutioner(command, externalApp) + + if result.find('Success:') == -1: + raise BaseException(result) + + statusFile = open(tempStatusPath, 'w') + statusFile.writelines('Activating WooCommerce Plugin,90') + statusFile.close() + + command = "wp plugin activate woocommerce --allow-root --path=" + finalPath + result = ProcessUtilities.outputExecutioner(command, externalApp) + + if result.find('Success:') == -1: + raise BaseException(result) + + except: + pass + ##