Fix cloudflare conf

This commit is contained in:
VirtuBox
2019-08-26 19:43:21 +02:00
parent b156fd00b8
commit b9d9969093
3 changed files with 10 additions and 10 deletions

View File

@@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Domain/Subdomain detection based on public domain suffixes list - Domain/Subdomain detection based on public domain suffixes list
- Increase Nginx & MariaDB systemd open_files limits - Increase Nginx & MariaDB systemd open_files limits
- Cronjob to update Cloudflare IPs list - Cronjob to update Cloudflare IPs list
- mariadb-backup to perform full and non-blocking databases backup
#### Changed #### Changed

View File

@@ -57,7 +57,7 @@ if not os.path.isfile('/root/.gitconfig'):
shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig') shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig')
setup(name='wo', setup(name='wo',
version='3.9.8.3', version='3.9.8.4',
description=long_description, description=long_description,
long_description=long_description, long_description=long_description,
classifiers=[], classifiers=[],

View File

@@ -202,15 +202,6 @@ def post_pref(self, apt_packages, packages):
WOTemplate.tmpl_render(self, WOTemplate.tmpl_render(self,
'{0}/cloudflare.conf'.format(ngxcnf), '{0}/cloudflare.conf'.format(ngxcnf),
'cloudflare.mustache', data) 'cloudflare.mustache', data)
Log.debug("Setting up freshclam cronjob")
WOTemplate.tmpl_render(self, '/opt/cf-update.sh',
'cf-update.mustache',
data, overwrite=False)
WOFileUtils.chmod(self, "/opt/cf-update.sh", 0o775)
WOCron.setcron_weekly(self, '/opt/cf-update.sh '
'> /dev/null 2>&1',
comment='Cloudflare IP refresh cronjob '
'added by WordOps')
WOTemplate.tmpl_render(self, WOTemplate.tmpl_render(self,
'{0}/map-wp-fastcgi-cache.conf'.format( '{0}/map-wp-fastcgi-cache.conf'.format(
@@ -476,6 +467,14 @@ def post_pref(self, apt_packages, packages):
"ssl_certificate_key " "ssl_certificate_key "
"/var/www/22222/cert/22222.key;\n") "/var/www/22222/cert/22222.key;\n")
server_ip = requests.get('http://v4.wordops.eu') server_ip = requests.get('http://v4.wordops.eu')
WOTemplate.tmpl_render(self, '/opt/cf-update.sh',
'cf-update.mustache',
data, overwrite=False)
WOFileUtils.chmod(self, "/opt/cf-update.sh", 0o775)
WOCron.setcron_weekly(self, '/opt/cf-update.sh '
'> /dev/null 2>&1',
comment='Cloudflare IP refresh cronjob '
'added by WordOps')
# Nginx Configation into GIT # Nginx Configation into GIT
WOGit.add(self, WOGit.add(self,
["/etc/nginx"], msg="Adding Nginx into Git") ["/etc/nginx"], msg="Adding Nginx into Git")