Add wprocket to cache list
This commit is contained in:
@@ -14,8 +14,8 @@
|
|||||||
<img src="https://img.shields.io/github/license/wordops/wordops.svg" alt="MIT">
|
<img src="https://img.shields.io/github/license/wordops/wordops.svg" alt="MIT">
|
||||||
<img src="https://img.shields.io/github/last-commit/wordops/wordops.svg" alt="Commits">
|
<img src="https://img.shields.io/github/last-commit/wordops/wordops.svg" alt="Commits">
|
||||||
<img alt="GitHub release" src="https://img.shields.io/github/release/WordOps/WordOps.svg">
|
<img alt="GitHub release" src="https://img.shields.io/github/release/WordOps/WordOps.svg">
|
||||||
<br><img src="https://netdata.wordops.eu/netdata/api/v1/badge.svg?chart=web_log_wops.cc.requests_per_url&options=unaligned&dimensions=download&group=sum&after=-86400&label=today&units=installations&precision=0&value_color=%230055AA" alt >
|
<br><img src="https://netdata.wordops.eu/netdata/api/v1/badge.svg?chart=web_log_wops.cc.requests_per_url&options=unaligned&dimensions=download&group=sum&after=-86400&label=today&units=installations&precision=0&value_color=%230055AA" alt="WordOps install" >
|
||||||
<a href="https://www.codacy.com/app/VirtuBox/WordOps?utm_source=github.com&utm_medium=referral&utm_content=WordOps/WordOps&utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/fe9100fd2c634de7882ecec17f00a11a"/></a>
|
<a href="https://www.codacy.com/app/VirtuBox/WordOps?utm_source=github.com&utm_medium=referral&utm_content=WordOps/WordOps&utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/fe9100fd2c634de7882ecec17f00a11a" alt="codacy"/></a>
|
||||||
<a href="https://twitter.com/WordOps_" target="_blank"><img src="https://img.shields.io/badge/twitter-%40WordOps__-blue.svg?style=flat&logo=twitter" alt="Badge Twitter" /></a>
|
<a href="https://twitter.com/WordOps_" target="_blank"><img src="https://img.shields.io/badge/twitter-%40WordOps__-blue.svg?style=flat&logo=twitter" alt="Badge Twitter" /></a>
|
||||||
<a href="https://community.wordops.net/slack" target="_blank"><img src="https://img.shields.io/badge/slack-WordOps-4A154B.svg?style=flat&logo=slack" alt="Badge Slack" /></a>
|
<a href="https://community.wordops.net/slack" target="_blank"><img src="https://img.shields.io/badge/slack-WordOps-4A154B.svg?style=flat&logo=slack" alt="Badge Slack" /></a>
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ class WOCleanController(CementBaseController):
|
|||||||
dict(help='Clean all cache', action='store_true')),
|
dict(help='Clean all cache', action='store_true')),
|
||||||
(['--fastcgi'],
|
(['--fastcgi'],
|
||||||
dict(help='Clean FastCGI cache', action='store_true')),
|
dict(help='Clean FastCGI cache', action='store_true')),
|
||||||
(['--memcached'],
|
|
||||||
dict(help='Clean MemCached', action='store_true')),
|
|
||||||
(['--opcache'],
|
(['--opcache'],
|
||||||
dict(help='Clean OpCache', action='store_true')),
|
dict(help='Clean OpCache', action='store_true')),
|
||||||
(['--redis'],
|
(['--redis'],
|
||||||
@@ -43,14 +41,11 @@ class WOCleanController(CementBaseController):
|
|||||||
pargs.redis)):
|
pargs.redis)):
|
||||||
self.clean_fastcgi()
|
self.clean_fastcgi()
|
||||||
if pargs.all:
|
if pargs.all:
|
||||||
self.clean_memcached()
|
|
||||||
self.clean_fastcgi()
|
self.clean_fastcgi()
|
||||||
self.clean_opcache()
|
self.clean_opcache()
|
||||||
self.clean_redis()
|
self.clean_redis()
|
||||||
if pargs.fastcgi:
|
if pargs.fastcgi:
|
||||||
self.clean_fastcgi()
|
self.clean_fastcgi()
|
||||||
if pargs.memcached:
|
|
||||||
self.clean_memcached()
|
|
||||||
if pargs.opcache:
|
if pargs.opcache:
|
||||||
self.clean_opcache()
|
self.clean_opcache()
|
||||||
if pargs.redis:
|
if pargs.redis:
|
||||||
@@ -65,23 +60,12 @@ class WOCleanController(CementBaseController):
|
|||||||
else:
|
else:
|
||||||
Log.info(self, "Redis is not installed")
|
Log.info(self, "Redis is not installed")
|
||||||
|
|
||||||
@expose(hide=True)
|
|
||||||
def clean_memcached(self):
|
|
||||||
try:
|
|
||||||
if(WOAptGet.is_installed(self, "memcached")):
|
|
||||||
WOService.restart_service(self, "memcached")
|
|
||||||
Log.info(self, "Cleaning MemCached")
|
|
||||||
else:
|
|
||||||
Log.info(self, "Memcached not installed")
|
|
||||||
except Exception as e:
|
|
||||||
Log.debug(self, "{0}".format(e))
|
|
||||||
Log.error(self, "Unable to restart Memcached", False)
|
|
||||||
|
|
||||||
@expose(hide=True)
|
@expose(hide=True)
|
||||||
def clean_fastcgi(self):
|
def clean_fastcgi(self):
|
||||||
if(os.path.isdir("/var/run/nginx-cache")):
|
if(os.path.isdir("/var/run/nginx-cache")):
|
||||||
Log.info(self, "Cleaning NGINX FastCGI cache")
|
Log.info(self, "Cleaning NGINX FastCGI cache")
|
||||||
WOShellExec.cmd_exec(self, "rm -rf /var/run/nginx-cache/*")
|
WOShellExec.cmd_exec(self, "rm -rf /var/run/nginx-cache/*")
|
||||||
|
WOService.restart_service(self, 'nginx')
|
||||||
else:
|
else:
|
||||||
Log.error(self, "Unable to clean FastCGI cache", False)
|
Log.error(self, "Unable to clean FastCGI cache", False)
|
||||||
|
|
||||||
@@ -89,7 +73,7 @@ class WOCleanController(CementBaseController):
|
|||||||
def clean_opcache(self):
|
def clean_opcache(self):
|
||||||
try:
|
try:
|
||||||
Log.info(self, "Cleaning opcache")
|
Log.info(self, "Cleaning opcache")
|
||||||
urllib.request.urlopen(" https://127.0.0.1:22222/cache"
|
urllib.request.urlopen("https://127.0.0.1:22222/cache"
|
||||||
"/opcache/opgui.php?reset=1").read()
|
"/opcache/opgui.php?reset=1").read()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
Log.debug(self, "{0}".format(e))
|
Log.debug(self, "{0}".format(e))
|
||||||
|
|||||||
@@ -1098,7 +1098,7 @@ def detSitePar(opts):
|
|||||||
if val and key in ['html', 'php', 'mysql', 'wp',
|
if val and key in ['html', 'php', 'mysql', 'wp',
|
||||||
'wpsubdir', 'wpsubdomain', 'php73']:
|
'wpsubdir', 'wpsubdomain', 'php73']:
|
||||||
typelist.append(key)
|
typelist.append(key)
|
||||||
elif val and key in ['wpfc', 'wpsc', 'wpredis']:
|
elif val and key in ['wpfc', 'wpsc', 'wpredis', 'wprocket']:
|
||||||
cachelist.append(key)
|
cachelist.append(key)
|
||||||
|
|
||||||
if len(typelist) > 1 or len(cachelist) > 1:
|
if len(typelist) > 1 or len(cachelist) > 1:
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ class WOStackStatusController(CementBaseController):
|
|||||||
Log.info(self, "PHP7.3-FPM is not installed")
|
Log.info(self, "PHP7.3-FPM is not installed")
|
||||||
|
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
if ((WOVariables.wo_mysql_host is "localhost") or
|
if ((WOVariables.wo_mysql_host == "localhost") or
|
||||||
(WOVariables.wo_mysql_host is "127.0.0.1")):
|
(WOVariables.wo_mysql_host == "127.0.0.1")):
|
||||||
if (WOAptGet.is_installed(self, 'mysql-server') or
|
if (WOAptGet.is_installed(self, 'mysql-server') or
|
||||||
WOAptGet.is_installed(self, 'percona-server-server-5.6') or
|
WOAptGet.is_installed(self, 'percona-server-server-5.6') or
|
||||||
WOAptGet.is_installed(self, 'mariadb-server')):
|
WOAptGet.is_installed(self, 'mariadb-server')):
|
||||||
@@ -139,8 +139,8 @@ class WOStackStatusController(CementBaseController):
|
|||||||
|
|
||||||
# mysql
|
# mysql
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
if ((WOVariables.wo_mysql_host is "localhost") or
|
if ((WOVariables.wo_mysql_host == "localhost") or
|
||||||
(WOVariables.wo_mysql_host is "127.0.0.1")):
|
(WOVariables.wo_mysql_host == "127.0.0.1")):
|
||||||
if (WOAptGet.is_installed(self, 'mysql-server') or
|
if (WOAptGet.is_installed(self, 'mysql-server') or
|
||||||
WOAptGet.is_installed(self, 'percona-server-server-5.6') or
|
WOAptGet.is_installed(self, 'percona-server-server-5.6') or
|
||||||
WOAptGet.is_installed(self, 'mariadb-server')):
|
WOAptGet.is_installed(self, 'mariadb-server')):
|
||||||
@@ -223,8 +223,8 @@ class WOStackStatusController(CementBaseController):
|
|||||||
Log.info(self, "PHP7.3-FPM is not installed")
|
Log.info(self, "PHP7.3-FPM is not installed")
|
||||||
|
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
if ((WOVariables.wo_mysql_host is "localhost") or
|
if ((WOVariables.wo_mysql_host == "localhost") or
|
||||||
(WOVariables.wo_mysql_host is "127.0.0.1")):
|
(WOVariables.wo_mysql_host == "127.0.0.1")):
|
||||||
if ((WOAptGet.is_installed(self, 'mysql-server') or
|
if ((WOAptGet.is_installed(self, 'mysql-server') or
|
||||||
WOAptGet.is_installed(self,
|
WOAptGet.is_installed(self,
|
||||||
'percona-server-server-5.6') or
|
'percona-server-server-5.6') or
|
||||||
@@ -306,8 +306,8 @@ class WOStackStatusController(CementBaseController):
|
|||||||
Log.info(self, "PHP7.3-FPM is not installed")
|
Log.info(self, "PHP7.3-FPM is not installed")
|
||||||
|
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
if ((WOVariables.wo_mysql_host is "localhost") or
|
if ((WOVariables.wo_mysql_host == "localhost") or
|
||||||
(WOVariables.wo_mysql_host is "127.0.0.1")):
|
(WOVariables.wo_mysql_host == "127.0.0.1")):
|
||||||
if (WOAptGet.is_installed(self, 'mysql-server') or
|
if (WOAptGet.is_installed(self, 'mysql-server') or
|
||||||
WOAptGet.is_installed(self, 'percona-server-server-5.6') or
|
WOAptGet.is_installed(self, 'percona-server-server-5.6') or
|
||||||
WOAptGet.is_installed(self, 'mariadb-server')):
|
WOAptGet.is_installed(self, 'mariadb-server')):
|
||||||
@@ -389,8 +389,8 @@ class WOStackStatusController(CementBaseController):
|
|||||||
Log.info(self, "PHP7.3-FPM is not installed")
|
Log.info(self, "PHP7.3-FPM is not installed")
|
||||||
|
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
if ((WOVariables.wo_mysql_host is "localhost") or
|
if ((WOVariables.wo_mysql_host == "localhost") or
|
||||||
(WOVariables.wo_mysql_host is "127.0.0.1")):
|
(WOVariables.wo_mysql_host == "127.0.0.1")):
|
||||||
if (WOAptGet.is_installed(self, 'mysql-server') or
|
if (WOAptGet.is_installed(self, 'mysql-server') or
|
||||||
WOAptGet.is_installed(self, 'percona-server-server-5.6') or
|
WOAptGet.is_installed(self, 'percona-server-server-5.6') or
|
||||||
WOAptGet.is_installed(self, 'mariadb-server')):
|
WOAptGet.is_installed(self, 'mariadb-server')):
|
||||||
|
|||||||
Reference in New Issue
Block a user