File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 11#!/usr/local/CyberCP/bin/python
2+ import subprocess
23import threading as multi
34from plogical .CyberCPLogFileWriter import CyberCPLogFileWriter as logging
45from plogical .virtualHostUtilities import virtualHostUtilities
@@ -51,6 +52,21 @@ def startCloning(self):
5152 masterPath = '/home/%s/public_html' % (masterDomain )
5253 replaceDomain = masterDomain
5354
55+ ### Check WP CLI
56+
57+ try :
58+ command = 'wp --info'
59+ outout = ProcessUtilities .outputExecutioner (command )
60+
61+ if not outout .find ('WP-CLI root dir:' ) > - 1 :
62+ from plogical .applicationInstaller import ApplicationInstaller
63+ ai = ApplicationInstaller (None , None )
64+ ai .installWPCLI ()
65+ except subprocess .CalledProcessError :
66+ from plogical .applicationInstaller import ApplicationInstaller
67+ ai = ApplicationInstaller (None , None )
68+ ai .installWPCLI ()
69+
5470 configPath = '%s/wp-config.php' % (masterPath )
5571
5672 ## Check if WP Detected on Main Site
You can’t perform that action at this time.
0 commit comments