mirror of https://github.com/WordOps/WordOps
Merge pull request #323 from WordOps/updating-configuration
v3.12.4 - WordOps maintenance release
This commit is contained in:
commit
7b5740fdbd
14
.travis.yml
14
.travis.yml
|
@ -1,8 +1,14 @@
|
|||
os: linux
|
||||
dist: bionic
|
||||
|
||||
language: shell
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- os: linux
|
||||
dist: xenial
|
||||
- os: linux
|
||||
dist: bionic
|
||||
- os: linux
|
||||
dist: focal
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
secure: "JiGtzYplTyFg/L6Rsi7ptEQIV29O5qCWU2Zf5pLITsQrBrQO4cIXXp9G4Z+cenXjfIiqbqIgU0US3zXeIAl4g14xdfzmMYeMMwuKBpI8afMYv8MD6ldoP0MTFHQfROE6OXxKLVUvZn1R0oLLU1fzVSI0qGjNkt20cf/Lrt/reH/zS5hAI92kWI3u2zPu7Zn/g/a8MO/Y3Iv7v1PSQaVkVJVqtOK3U2GJqhIv2G1AVcaPb7Nh/V2zm2dDYBVT0UotBnlBUcUXbEMP77D9pjtWXd1/0rWuJIHixMjwUybpZqY75UMee5INynU6OZRsv029LRHAIMkWhfBkdVN/U5jhQJzui14+vRQrb5nfUMG8Cd8INojDlu6dk/ps2GzTCCXBITeMQKAouUoHD2LEbsNp17xi1K4ZlKb3+0lrOAiS4JYFE6wOo4yMlLTYoquYSqk7AuxuUS8A5OD5MYxhk9uafiTSxKFOo39KYWTSaACsPD8q1swaTSjoYm9skyZvIkIFq5bHBCYEGFe6X/NY9l5tz3hSe+TJOerCHsg+dXVuQl+pIp5nw2as9TH9ox5Vgqc9Zh4GbTDQVvdAmUpmlsZ/SKoOMCkmkB1aRNFq/7RnERIJyAEGJbauHWmjtOM4cCxesl0L0b2Eab89zQpSn7pzE8JTiJgpzCUc22p653PTaqM="
|
||||
|
@ -17,7 +23,7 @@ before_script:
|
|||
- sudo rm -rf /etc/mysql
|
||||
- sudo bash -c 'echo example.com > /etc/hostname'
|
||||
- unset LANG
|
||||
- sudo apt-get update --allow-releaseinfo-change -qq
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get -qq purge mysql* graphviz* redis* php*
|
||||
- sudo apt-get -qq autoremove --purge
|
||||
|
||||
|
|
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -8,6 +8,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
|
||||
### v3.9.x - [Unreleased]
|
||||
|
||||
### v3.12.4 - 2020-10-14
|
||||
|
||||
#### Changed
|
||||
|
||||
- Redis 6.0.6 available on Ubuntu LTS
|
||||
|
||||
#### Fixed
|
||||
|
||||
- Avif (AV1 Image Format) & WebP Nginx conditional support([PR #322](https://github.com/WordOps/WordOps/pull/322))
|
||||
- Sendmail initial configuration with sendmailconfig
|
||||
- SSL certificates export encoding with utf-8
|
||||
- Nanorc install on Ubuntu 16.04 LTS
|
||||
|
||||
### v3.12.3 - 2020-10-13
|
||||
|
||||
#### Added
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
- **Easy to install** : One step automated installer with migration from EasyEngine v3 support
|
||||
- **Fast deployment** : Fast and automated WordPress, Nginx, PHP, MySQL & Redis installation
|
||||
- **Custom Nginx build** : Nginx 1.18.0 - TLS v1.3 Cloudflare HTTP/2 HPACK & Brotli support
|
||||
- **Up-to-date** : PHP 7.2, 7.3 & 7.4, MariaDB 10.3 & Redis 5.0
|
||||
- **Up-to-date** : PHP 7.2, 7.3 & 7.4, MariaDB 10.3 & Redis 6.0
|
||||
- **Secured** : Hardened WordPress security with strict Nginx location directives
|
||||
- **Powerful** : Optimized Nginx configurations with multiple cache backends support
|
||||
- **SSL** : Domain, Subdomain & Wildcard Let's Encrypt SSL certificates with DNS API support
|
||||
|
|
6
install
6
install
|
@ -9,7 +9,7 @@
|
|||
# -------------------------------------------------------------------------
|
||||
# wget -qO wo wops.cc && sudo -E bash wo
|
||||
# -------------------------------------------------------------------------
|
||||
# Version 3.12.3 - 2020-10-13
|
||||
# Version 3.12.4 - 2020-10-14
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# CONTENTS
|
||||
|
@ -209,13 +209,13 @@ wo_install_dep() {
|
|||
# install dependencies
|
||||
apt-get -option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \
|
||||
build-essential curl gzip python3-pip python3-apt gcc python3-dev sqlite3 git tar software-properties-common pigz \
|
||||
gnupg2 cron ccze rsync apt-transport-https tree haveged ufw unattended-upgrades tzdata ntp zstd >/dev/null 2>&1
|
||||
gnupg2 cron ccze rsync apt-transport-https tree haveged ufw unattended-upgrades tzdata ntp zstd idn >/dev/null 2>&1
|
||||
curl -sL https://download.opensuse.org/repositories/home:/virtubox:/WordOps/xUbuntu_18.04/Release.key | apt-key add -
|
||||
else
|
||||
# install dependencies
|
||||
apt-get -option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \
|
||||
build-essential curl gzip dirmngr sudo python3-pip python3-apt gcc python3-dev ca-certificates sqlite3 git tar \
|
||||
software-properties-common pigz apt-transport-https gnupg2 cron ccze rsync tree haveged ufw unattended-upgrades tzdata ntp zstd >/dev/null 2>&1
|
||||
software-properties-common pigz apt-transport-https gnupg2 cron ccze rsync tree haveged ufw unattended-upgrades tzdata ntp zstd idn >/dev/null 2>&1
|
||||
# add php repository gpg key
|
||||
[ -d /etc/apt/trusted.gpg.d ] && { wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; }
|
||||
# add nginx repository gpg key
|
||||
|
|
2
setup.py
2
setup.py
|
@ -27,7 +27,7 @@
|
|||
os.makedirs('/var/lib/wo/tmp/')
|
||||
|
||||
setup(name='wordops',
|
||||
version='3.12.3',
|
||||
version='3.12.4',
|
||||
description='An essential toolset that eases server administration',
|
||||
long_description=LONG,
|
||||
long_description_content_type='text/markdown',
|
||||
|
|
|
@ -13,6 +13,7 @@ export DEBIAN_FRONTEND=noninteractive
|
|||
unset LANG
|
||||
export LANG='en_US.UTF-8'
|
||||
export LC_ALL='C.UTF-8'
|
||||
wo_distro=$(lsb_release -sc)
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
{
|
||||
|
@ -30,7 +31,7 @@ exit_script() {
|
|||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
echo -e ' stack install '
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
stack_list='nginx php php73 php74 mysql redis fail2ban clamav proftpd netdata phpmyadmin composer dashboard extplorer adminer redis phpredisadmin mysqltuner utils ufw ngxblocker cheat nanorc'
|
||||
stack_list='nginx php php73 php74 mysql redis fail2ban clamav proftpd netdata phpmyadmin composer dashboard extplorer adminer redis sendmail phpredisadmin mysqltuner utils ufw ngxblocker cheat nanorc'
|
||||
for stack in $stack_list; do
|
||||
echo -ne " Installing $stack [..]\r"
|
||||
if {
|
||||
|
@ -259,29 +260,31 @@ else
|
|||
exit_script
|
||||
|
||||
fi
|
||||
echo -ne " wo secure --sshport [..]\r"
|
||||
if {
|
||||
wo secure --sshport 2022
|
||||
} >>/var/log/wo/test.log; then
|
||||
echo -ne " wo secure --sshport [${CGREEN}OK${CEND}]\\r"
|
||||
echo -ne '\n'
|
||||
else
|
||||
echo -e " wo secure --sshport [${CRED}FAIL${CEND}]"
|
||||
echo -ne '\n'
|
||||
exit_script
|
||||
if [ "$wo_distro" != "focal" ]; then
|
||||
echo -ne " wo secure --sshport [..]\r"
|
||||
if {
|
||||
wo secure --sshport 2022
|
||||
} >>/var/log/wo/test.log; then
|
||||
echo -ne " wo secure --sshport [${CGREEN}OK${CEND}]\\r"
|
||||
echo -ne '\n'
|
||||
else
|
||||
echo -e " wo secure --sshport [${CRED}FAIL${CEND}]"
|
||||
echo -ne '\n'
|
||||
exit_script
|
||||
|
||||
fi
|
||||
echo -ne " wo secure --ssh [..]\r"
|
||||
if {
|
||||
wo secure --ssh --force
|
||||
} >>/var/log/wo/test.log; then
|
||||
echo -ne " wo secure --ssh [${CGREEN}OK${CEND}]\\r"
|
||||
echo -ne '\n'
|
||||
else
|
||||
echo -e " wo secure --ssh [${CRED}FAIL${CEND}]"
|
||||
echo -ne '\n'
|
||||
exit_script
|
||||
fi
|
||||
echo -ne " wo secure --ssh [..]\r"
|
||||
if {
|
||||
wo secure --ssh --force
|
||||
} >>/var/log/wo/test.log; then
|
||||
echo -ne " wo secure --ssh [${CGREEN}OK${CEND}]\\r"
|
||||
echo -ne '\n'
|
||||
else
|
||||
echo -e " wo secure --ssh [${CRED}FAIL${CEND}]"
|
||||
echo -ne '\n'
|
||||
exit_script
|
||||
|
||||
fi
|
||||
fi
|
||||
echo -ne " wo secure --port [..]\r"
|
||||
if {
|
||||
|
@ -351,18 +354,3 @@ for stack in $stack_purge; do
|
|||
|
||||
fi
|
||||
done
|
||||
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
echo -e ' wo stack fail2ban '
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
if {
|
||||
wo stack install --fail2ban
|
||||
} >>/var/log/wo/test.log; then
|
||||
echo -ne " purging $stack [${CGREEN}OK${CEND}]\\r"
|
||||
echo -ne '\n'
|
||||
else
|
||||
echo -e " purging $stack [${CRED}FAIL${CEND}]"
|
||||
echo -ne '\n'
|
||||
exit_script
|
||||
|
||||
fi
|
||||
|
|
|
@ -139,10 +139,9 @@ def pre_pref(self, apt_packages):
|
|||
# add redis repository
|
||||
if set(WOVar.wo_redis).issubset(set(apt_packages)):
|
||||
if WOVar.wo_distro == 'ubuntu':
|
||||
if not WOVar.wo_platform_codename == 'focal':
|
||||
Log.info(self, "Adding repository for Redis, please wait...")
|
||||
Log.debug(self, 'Adding ppa for redis')
|
||||
WORepo.add(self, ppa=WOVar.wo_redis_repo)
|
||||
Log.info(self, "Adding repository for Redis, please wait...")
|
||||
Log.debug(self, 'Adding ppa for redis')
|
||||
WORepo.add(self, ppa=WOVar.wo_redis_repo)
|
||||
else:
|
||||
if not WOFileUtils.grepcheck(
|
||||
self, '/etc/apt/sources.list/wo-repo.list',
|
||||
|
@ -154,14 +153,17 @@ def pre_pref(self, apt_packages):
|
|||
# nano
|
||||
if 'nano' in apt_packages:
|
||||
if WOVar.wo_distro == 'ubuntu':
|
||||
if (WOVar.wo_platform_codename == 'bionic' or
|
||||
WOVar.wo_platform_codename == 'xenial'):
|
||||
if WOVar.wo_platform_codename == 'bionic':
|
||||
Log.debug(self, 'Adding ppa for nano')
|
||||
WORepo.add(self, ppa=WOVar.wo_ubuntu_backports)
|
||||
elif WOVar.wo_platform_codename == 'xenial':
|
||||
Log.debug(self, 'Adding ppa for nano')
|
||||
WORepo.add_key(self, WOVar.wo_nginx_key)
|
||||
WORepo.add(self, repo_url=WOVar.wo_extra_repo)
|
||||
else:
|
||||
if not WOFileUtils.grepcheck(
|
||||
if (not WOFileUtils.grepcheck(
|
||||
self, '/etc/apt/sources.list/wo-repo.list',
|
||||
'WordOps'):
|
||||
'WordOps')):
|
||||
Log.info(self, "Adding repository for Nano, please wait...")
|
||||
Log.debug(self, 'Adding repository for Nano')
|
||||
WORepo.add_key(self, WOVar.wo_nginx_key)
|
||||
|
@ -1135,6 +1137,16 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
|||
WOGit.add(self, ["/etc/proftpd"],
|
||||
msg="Adding ProFTPd into Git")
|
||||
|
||||
# Sendmail configuration
|
||||
if "sendmail" in apt_packages:
|
||||
if (os.path.exists("/usr/bin/yes") and
|
||||
os.path.exists("/usr/sbin/sendmailconfig")):
|
||||
Log.wait(self, "Configuring Sendmail")
|
||||
if WOShellExec.cmd_exec(self, "yes 'y' | sendmailconfig"):
|
||||
Log.valide(self, "Configuring Sendmail")
|
||||
else:
|
||||
Log.failed(self, "Configuring Sendmail")
|
||||
|
||||
if "ufw" in apt_packages:
|
||||
# check if ufw is already enabled
|
||||
if not WOFileUtils.grep(self,
|
||||
|
|
|
@ -51,11 +51,14 @@ def export_cert(self):
|
|||
"""Export acme.sh csv certificate list"""
|
||||
# check acme.sh is installed
|
||||
WOAcme.check_acme(self)
|
||||
if not WOShellExec.cmd_exec(
|
||||
self, "{0} ".format(WOAcme.wo_acme_exec) +
|
||||
"--list --listraw > /var/lib/wo/cert.csv"):
|
||||
acme_list = WOShellExec.cmd_exec_stdout(
|
||||
self, "{0} ".format(WOAcme.wo_acme_exec) +
|
||||
"--list --listraw")
|
||||
if acme_list:
|
||||
WOFileUtils.textwrite(self, '/var/lib/wo/cert.csv', acme_list)
|
||||
WOFileUtils.chmod(self, '/var/lib/wo/cert.csv', 0o600)
|
||||
else:
|
||||
Log.error(self, "Unable to export certs list")
|
||||
WOFileUtils.chmod(self, '/var/lib/wo/cert.csv', 0o600)
|
||||
|
||||
def setupletsencrypt(self, acme_domains, acmedata):
|
||||
"""Issue SSL certificates with acme.sh"""
|
||||
|
@ -211,7 +214,8 @@ def cert_check(self, wo_domain_name):
|
|||
# define new csv dialect
|
||||
csv.register_dialect('acmeconf', delimiter='|')
|
||||
# open file
|
||||
certfile = open('/var/lib/wo/cert.csv', mode='r', encoding='utf-8')
|
||||
certfile = open('/var/lib/wo/cert.csv',
|
||||
mode='r', encoding='utf-8')
|
||||
reader = csv.reader(certfile, 'acmeconf')
|
||||
for row in reader:
|
||||
# check if domain exist
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import os
|
||||
import pwd
|
||||
import shutil
|
||||
import codecs
|
||||
|
||||
from wo.core.logging import Log
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ class WOVar():
|
|||
"""Intialization of core variables"""
|
||||
|
||||
# WordOps version
|
||||
wo_version = "3.12.3"
|
||||
wo_version = "3.12.4"
|
||||
# WordOps packages versions
|
||||
wo_wp_cli = "2.4.0"
|
||||
wo_adminer = "4.7.5"
|
||||
|
@ -111,6 +111,10 @@ class WOVar():
|
|||
# Nginx repo and packages
|
||||
if wo_distro == 'ubuntu':
|
||||
wo_nginx_repo = "ppa:wordops/nginx-wo"
|
||||
wo_extra_repo = (
|
||||
"deb http://download.opensuse.org"
|
||||
"/repositories/home:/virtubox:"
|
||||
"/WordOps/xUbuntu_{0}/ /".format(wo_platform_version))
|
||||
else:
|
||||
if wo_distro == 'debian':
|
||||
if wo_platform_codename == 'jessie':
|
||||
|
|
Loading…
Reference in New Issue