|
|
@ -23,7 +23,7 @@ class EEStackStatusController(CementBaseController): |
|
|
|
def start(self): |
|
|
|
"""Start services""" |
|
|
|
services = [] |
|
|
|
if not (self.app.pargs.nginx or self.app.pargs.php |
|
|
|
if not (self.app.pargs.nginx or self.app.pargs.php or self.app.pargs.php7 |
|
|
|
or self.app.pargs.mysql or self.app.pargs.postfix |
|
|
|
or self.app.pargs.hhvm or self.app.pargs.memcache |
|
|
|
or self.app.pargs.dovecot or self.app.pargs.redis): |
|
|
@ -39,10 +39,30 @@ class EEStackStatusController(CementBaseController): |
|
|
|
Log.info(self, "Nginx is not installed") |
|
|
|
|
|
|
|
if self.app.pargs.php: |
|
|
|
if EEAptGet.is_installed(self, 'php5-fpm'): |
|
|
|
services = services + ['php5-fpm'] |
|
|
|
if EEVariables.ee_platform_codename != 'trusty': |
|
|
|
if EEAptGet.is_installed(self, 'php5-fpm'): |
|
|
|
services = services + ['php5-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP5-FPM is not installed") |
|
|
|
else: |
|
|
|
if EEAptGet.is_installed(self, 'php5.6-fpm'): |
|
|
|
services = services + ['php5.6-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP5.6-FPM is not installed") |
|
|
|
|
|
|
|
if EEAptGet.is_installed(self, 'php7.0-fpm'): |
|
|
|
services = services + ['php7.0-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP7.0-FPM is not installed") |
|
|
|
|
|
|
|
if self.app.pargs.php7: |
|
|
|
if EEVariables.ee_platform_codename == 'trusty': |
|
|
|
if EEAptGet.is_installed(self, 'php7.0-fpm'): |
|
|
|
services = services + ['php7.0-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP7.0-FPM is not installed") |
|
|
|
else: |
|
|
|
Log.info(self, "PHP5-FPM is not installed") |
|
|
|
Log.info(self, "Your platform does not support PHP 7") |
|
|
|
|
|
|
|
if self.app.pargs.mysql: |
|
|
|
if ((EEVariables.ee_mysql_host is "localhost") or |
|
|
@ -94,7 +114,7 @@ class EEStackStatusController(CementBaseController): |
|
|
|
def stop(self): |
|
|
|
"""Stop services""" |
|
|
|
services = [] |
|
|
|
if not (self.app.pargs.nginx or self.app.pargs.php |
|
|
|
if not (self.app.pargs.nginx or self.app.pargs.php or self.app.pargs.php7 |
|
|
|
or self.app.pargs.mysql or self.app.pargs.postfix |
|
|
|
or self.app.pargs.hhvm or self.app.pargs.memcache |
|
|
|
or self.app.pargs.dovecot or self.app.pargs.redis): |
|
|
@ -110,10 +130,30 @@ class EEStackStatusController(CementBaseController): |
|
|
|
Log.info(self, "Nginx is not installed") |
|
|
|
|
|
|
|
if self.app.pargs.php: |
|
|
|
if EEAptGet.is_installed(self, 'php5-fpm'): |
|
|
|
services = services + ['php5-fpm'] |
|
|
|
if EEVariables.ee_platform_codename != 'trusty': |
|
|
|
if EEAptGet.is_installed(self, 'php5-fpm'): |
|
|
|
services = services + ['php5-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP5-FPM is not installed") |
|
|
|
else: |
|
|
|
if EEAptGet.is_installed(self, 'php5.6-fpm'): |
|
|
|
services = services + ['php5.6-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP5.6-FPM is not installed") |
|
|
|
|
|
|
|
if EEAptGet.is_installed(self, 'php7.0-fpm'): |
|
|
|
services = services + ['php7.0-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP7.0-FPM is not installed") |
|
|
|
|
|
|
|
if self.app.pargs.php7: |
|
|
|
if EEVariables.ee_platform_codename == 'trusty': |
|
|
|
if EEAptGet.is_installed(self, 'php7.0-fpm'): |
|
|
|
services = services + ['php7.0-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP7.0-FPM is not installed") |
|
|
|
else: |
|
|
|
Log.info(self, "PHP5-FPM is not installed") |
|
|
|
Log.info(self, "Your platform does not support PHP 7") |
|
|
|
|
|
|
|
if self.app.pargs.mysql: |
|
|
|
if ((EEVariables.ee_mysql_host is "localhost") or |
|
|
@ -349,7 +389,7 @@ class EEStackStatusController(CementBaseController): |
|
|
|
def reload(self): |
|
|
|
"""Reload service""" |
|
|
|
services = [] |
|
|
|
if not (self.app.pargs.nginx or self.app.pargs.php |
|
|
|
if not (self.app.pargs.nginx or self.app.pargs.php or self.app.pargs.php7 |
|
|
|
or self.app.pargs.mysql or self.app.pargs.postfix |
|
|
|
or self.app.pargs.hhvm or self.app.pargs.memcache |
|
|
|
or self.app.pargs.dovecot or self.app.pargs.redis): |
|
|
@ -365,10 +405,30 @@ class EEStackStatusController(CementBaseController): |
|
|
|
Log.info(self, "Nginx is not installed") |
|
|
|
|
|
|
|
if self.app.pargs.php: |
|
|
|
if EEAptGet.is_installed(self, 'php5-fpm'): |
|
|
|
services = services + ['php5-fpm'] |
|
|
|
if EEVariables.ee_platform_codename != 'trusty': |
|
|
|
if EEAptGet.is_installed(self, 'php5-fpm'): |
|
|
|
services = services + ['php5-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP5-FPM is not installed") |
|
|
|
else: |
|
|
|
Log.info(self, "PHP5-FPM is not installed") |
|
|
|
if EEAptGet.is_installed(self, 'php5.6-fpm'): |
|
|
|
services = services + ['php5.6-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP5.6-FPM is not installed") |
|
|
|
|
|
|
|
if EEAptGet.is_installed(self, 'php7.0-fpm'): |
|
|
|
services = services + ['php7.0-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP7.0-FPM is not installed") |
|
|
|
|
|
|
|
if self.app.pargs.php7: |
|
|
|
if EEVariables.ee_platform_codename == 'trusty': |
|
|
|
if EEAptGet.is_installed(self, 'php7.0-fpm'): |
|
|
|
services = services + ['php7.0-fpm'] |
|
|
|
else: |
|
|
|
Log.info(self, "PHP7.0-FPM is not installed") |
|
|
|
else: |
|
|
|
Log.info(self, "Your platform does not support PHP 7") |
|
|
|
|
|
|
|
if self.app.pargs.mysql: |
|
|
|
if ((EEVariables.ee_mysql_host is "localhost") or |
|
|
|