Force Cloudflare script update
This commit is contained in:
@@ -194,11 +194,6 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
|||||||
WOTemplate.deploy(
|
WOTemplate.deploy(
|
||||||
self, '{0}/avif.conf'.format(ngxcnf),
|
self, '{0}/avif.conf'.format(ngxcnf),
|
||||||
'avif.mustache', data, overwrite=False)
|
'avif.mustache', data, overwrite=False)
|
||||||
|
|
||||||
WOTemplate.deploy(
|
|
||||||
self, '{0}/cloudflare.conf'.format(ngxcnf),
|
|
||||||
'cloudflare.mustache', data)
|
|
||||||
|
|
||||||
WOTemplate.deploy(
|
WOTemplate.deploy(
|
||||||
self,
|
self,
|
||||||
'{0}/map-wp-fastcgi-cache.conf'.format(ngxcnf),
|
'{0}/map-wp-fastcgi-cache.conf'.format(ngxcnf),
|
||||||
@@ -421,16 +416,17 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
|||||||
.format(server_ip.text,
|
.format(server_ip.text,
|
||||||
WOVar.wo_fqdn)])
|
WOVar.wo_fqdn)])
|
||||||
|
|
||||||
if not os.path.isfile("/opt/cf-update.sh"):
|
data = dict(release=WOVar.wo_version)
|
||||||
data = dict(release=WOVar.wo_version)
|
WOTemplate.deploy(self, '/opt/cf-update.sh',
|
||||||
WOTemplate.deploy(self, '/opt/cf-update.sh',
|
'cf-update.mustache',
|
||||||
'cf-update.mustache',
|
data, overwrite=True)
|
||||||
data, overwrite=False)
|
WOFileUtils.chmod(self, "/opt/cf-update.sh", 0o775)
|
||||||
WOFileUtils.chmod(self, "/opt/cf-update.sh", 0o775)
|
Log.debug(self, 'Creating Cloudflare.conf')
|
||||||
WOCron.setcron_weekly(self, '/opt/cf-update.sh '
|
WOShellExec.cmd_exec(self, '/opt/cf-update.sh')
|
||||||
'> /dev/null 2>&1',
|
WOCron.setcron_weekly(self, '/opt/cf-update.sh '
|
||||||
comment='Cloudflare IP refresh cronjob '
|
'> /dev/null 2>&1',
|
||||||
'added by WordOps')
|
comment='Cloudflare IP refresh cronjob '
|
||||||
|
'added by WordOps')
|
||||||
|
|
||||||
# Nginx Configation into GIT
|
# Nginx Configation into GIT
|
||||||
if not WOService.restart_service(self, 'nginx'):
|
if not WOService.restart_service(self, 'nginx'):
|
||||||
|
|||||||
Reference in New Issue
Block a user