Merge pull request #323 from WordOps/updating-configuration

v3.12.4 - WordOps maintenance release
This commit is contained in:
VirtuBox
2020-10-15 15:33:48 +02:00
committed by GitHub
10 changed files with 88 additions and 60 deletions

View File

@@ -1,8 +1,14 @@
os: linux
dist: bionic
language: shell language: shell
jobs:
include:
- os: linux
dist: xenial
- os: linux
dist: bionic
- os: linux
dist: focal
notifications: notifications:
webhooks: webhooks:
secure: "JiGtzYplTyFg/L6Rsi7ptEQIV29O5qCWU2Zf5pLITsQrBrQO4cIXXp9G4Z+cenXjfIiqbqIgU0US3zXeIAl4g14xdfzmMYeMMwuKBpI8afMYv8MD6ldoP0MTFHQfROE6OXxKLVUvZn1R0oLLU1fzVSI0qGjNkt20cf/Lrt/reH/zS5hAI92kWI3u2zPu7Zn/g/a8MO/Y3Iv7v1PSQaVkVJVqtOK3U2GJqhIv2G1AVcaPb7Nh/V2zm2dDYBVT0UotBnlBUcUXbEMP77D9pjtWXd1/0rWuJIHixMjwUybpZqY75UMee5INynU6OZRsv029LRHAIMkWhfBkdVN/U5jhQJzui14+vRQrb5nfUMG8Cd8INojDlu6dk/ps2GzTCCXBITeMQKAouUoHD2LEbsNp17xi1K4ZlKb3+0lrOAiS4JYFE6wOo4yMlLTYoquYSqk7AuxuUS8A5OD5MYxhk9uafiTSxKFOo39KYWTSaACsPD8q1swaTSjoYm9skyZvIkIFq5bHBCYEGFe6X/NY9l5tz3hSe+TJOerCHsg+dXVuQl+pIp5nw2as9TH9ox5Vgqc9Zh4GbTDQVvdAmUpmlsZ/SKoOMCkmkB1aRNFq/7RnERIJyAEGJbauHWmjtOM4cCxesl0L0b2Eab89zQpSn7pzE8JTiJgpzCUc22p653PTaqM=" 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 rm -rf /etc/mysql
- sudo bash -c 'echo example.com > /etc/hostname' - sudo bash -c 'echo example.com > /etc/hostname'
- unset LANG - 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 purge mysql* graphviz* redis* php*
- sudo apt-get -qq autoremove --purge - sudo apt-get -qq autoremove --purge

View File

@@ -8,6 +8,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### v3.9.x - [Unreleased] ### 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 ### v3.12.3 - 2020-10-13
#### Added #### Added

View File

@@ -42,7 +42,7 @@
- **Easy to install** : One step automated installer with migration from EasyEngine v3 support - **Easy to install** : One step automated installer with migration from EasyEngine v3 support
- **Fast deployment** : Fast and automated WordPress, Nginx, PHP, MySQL & Redis installation - **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 - **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 - **Secured** : Hardened WordPress security with strict Nginx location directives
- **Powerful** : Optimized Nginx configurations with multiple cache backends support - **Powerful** : Optimized Nginx configurations with multiple cache backends support
- **SSL** : Domain, Subdomain & Wildcard Let's Encrypt SSL certificates with DNS API support - **SSL** : Domain, Subdomain & Wildcard Let's Encrypt SSL certificates with DNS API support

View File

@@ -9,7 +9,7 @@
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# wget -qO wo wops.cc && sudo -E bash wo # wget -qO wo wops.cc && sudo -E bash wo
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# Version 3.12.3 - 2020-10-13 # Version 3.12.4 - 2020-10-14
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# CONTENTS # CONTENTS
@@ -209,13 +209,13 @@ wo_install_dep() {
# install dependencies # install dependencies
apt-get -option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \ 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 \ 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 - curl -sL https://download.opensuse.org/repositories/home:/virtubox:/WordOps/xUbuntu_18.04/Release.key | apt-key add -
else else
# install dependencies # install dependencies
apt-get -option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \ 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 \ 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 # 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; } [ -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 # add nginx repository gpg key

View File

@@ -27,7 +27,7 @@ if os.geteuid() == 0:
os.makedirs('/var/lib/wo/tmp/') os.makedirs('/var/lib/wo/tmp/')
setup(name='wordops', setup(name='wordops',
version='3.12.3', version='3.12.4',
description='An essential toolset that eases server administration', description='An essential toolset that eases server administration',
long_description=LONG, long_description=LONG,
long_description_content_type='text/markdown', long_description_content_type='text/markdown',

View File

@@ -13,6 +13,7 @@ export DEBIAN_FRONTEND=noninteractive
unset LANG unset LANG
export LANG='en_US.UTF-8' export LANG='en_US.UTF-8'
export LC_ALL='C.UTF-8' export LC_ALL='C.UTF-8'
wo_distro=$(lsb_release -sc)
if [ -z "$1" ]; then if [ -z "$1" ]; then
{ {
@@ -30,7 +31,7 @@ exit_script() {
echo -e "${CGREEN}#############################################${CEND}" echo -e "${CGREEN}#############################################${CEND}"
echo -e ' stack install ' echo -e ' stack install '
echo -e "${CGREEN}#############################################${CEND}" 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 for stack in $stack_list; do
echo -ne " Installing $stack [..]\r" echo -ne " Installing $stack [..]\r"
if { if {
@@ -259,29 +260,31 @@ else
exit_script exit_script
fi fi
echo -ne " wo secure --sshport [..]\r" if [ "$wo_distro" != "focal" ]; then
if { echo -ne " wo secure --sshport [..]\r"
wo secure --sshport 2022 if {
} >>/var/log/wo/test.log; then wo secure --sshport 2022
echo -ne " wo secure --sshport [${CGREEN}OK${CEND}]\\r" } >>/var/log/wo/test.log; then
echo -ne '\n' echo -ne " wo secure --sshport [${CGREEN}OK${CEND}]\\r"
else echo -ne '\n'
echo -e " wo secure --sshport [${CRED}FAIL${CEND}]" else
echo -ne '\n' echo -e " wo secure --sshport [${CRED}FAIL${CEND}]"
exit_script echo -ne '\n'
exit_script
fi fi
echo -ne " wo secure --ssh [..]\r" echo -ne " wo secure --ssh [..]\r"
if { if {
wo secure --ssh --force wo secure --ssh --force
} >>/var/log/wo/test.log; then } >>/var/log/wo/test.log; then
echo -ne " wo secure --ssh [${CGREEN}OK${CEND}]\\r" echo -ne " wo secure --ssh [${CGREEN}OK${CEND}]\\r"
echo -ne '\n' echo -ne '\n'
else else
echo -e " wo secure --ssh [${CRED}FAIL${CEND}]" echo -e " wo secure --ssh [${CRED}FAIL${CEND}]"
echo -ne '\n' echo -ne '\n'
exit_script exit_script
fi
fi fi
echo -ne " wo secure --port [..]\r" echo -ne " wo secure --port [..]\r"
if { if {
@@ -351,18 +354,3 @@ for stack in $stack_purge; do
fi fi
done 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

View File

@@ -139,10 +139,9 @@ def pre_pref(self, apt_packages):
# add redis repository # add redis repository
if set(WOVar.wo_redis).issubset(set(apt_packages)): if set(WOVar.wo_redis).issubset(set(apt_packages)):
if WOVar.wo_distro == 'ubuntu': if WOVar.wo_distro == 'ubuntu':
if not WOVar.wo_platform_codename == 'focal': Log.info(self, "Adding repository for Redis, please wait...")
Log.info(self, "Adding repository for Redis, please wait...") Log.debug(self, 'Adding ppa for redis')
Log.debug(self, 'Adding ppa for redis') WORepo.add(self, ppa=WOVar.wo_redis_repo)
WORepo.add(self, ppa=WOVar.wo_redis_repo)
else: else:
if not WOFileUtils.grepcheck( if not WOFileUtils.grepcheck(
self, '/etc/apt/sources.list/wo-repo.list', self, '/etc/apt/sources.list/wo-repo.list',
@@ -154,14 +153,17 @@ def pre_pref(self, apt_packages):
# nano # nano
if 'nano' in apt_packages: if 'nano' in apt_packages:
if WOVar.wo_distro == 'ubuntu': if WOVar.wo_distro == 'ubuntu':
if (WOVar.wo_platform_codename == 'bionic' or if WOVar.wo_platform_codename == 'bionic':
WOVar.wo_platform_codename == 'xenial'):
Log.debug(self, 'Adding ppa for nano') Log.debug(self, 'Adding ppa for nano')
WORepo.add(self, ppa=WOVar.wo_ubuntu_backports) 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: else:
if not WOFileUtils.grepcheck( if (not WOFileUtils.grepcheck(
self, '/etc/apt/sources.list/wo-repo.list', self, '/etc/apt/sources.list/wo-repo.list',
'WordOps'): 'WordOps')):
Log.info(self, "Adding repository for Nano, please wait...") Log.info(self, "Adding repository for Nano, please wait...")
Log.debug(self, 'Adding repository for Nano') Log.debug(self, 'Adding repository for Nano')
WORepo.add_key(self, WOVar.wo_nginx_key) 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"], WOGit.add(self, ["/etc/proftpd"],
msg="Adding ProFTPd into Git") 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: if "ufw" in apt_packages:
# check if ufw is already enabled # check if ufw is already enabled
if not WOFileUtils.grep(self, if not WOFileUtils.grep(self,

View File

@@ -51,11 +51,14 @@ class WOAcme:
"""Export acme.sh csv certificate list""" """Export acme.sh csv certificate list"""
# check acme.sh is installed # check acme.sh is installed
WOAcme.check_acme(self) WOAcme.check_acme(self)
if not WOShellExec.cmd_exec( acme_list = WOShellExec.cmd_exec_stdout(
self, "{0} ".format(WOAcme.wo_acme_exec) + self, "{0} ".format(WOAcme.wo_acme_exec) +
"--list --listraw > /var/lib/wo/cert.csv"): "--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") Log.error(self, "Unable to export certs list")
WOFileUtils.chmod(self, '/var/lib/wo/cert.csv', 0o600)
def setupletsencrypt(self, acme_domains, acmedata): def setupletsencrypt(self, acme_domains, acmedata):
"""Issue SSL certificates with acme.sh""" """Issue SSL certificates with acme.sh"""
@@ -211,7 +214,8 @@ class WOAcme:
# define new csv dialect # define new csv dialect
csv.register_dialect('acmeconf', delimiter='|') csv.register_dialect('acmeconf', delimiter='|')
# open file # 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') reader = csv.reader(certfile, 'acmeconf')
for row in reader: for row in reader:
# check if domain exist # check if domain exist

View File

@@ -3,6 +3,7 @@ import fileinput
import os import os
import pwd import pwd
import shutil import shutil
import codecs
from wo.core.logging import Log from wo.core.logging import Log

View File

@@ -14,7 +14,7 @@ class WOVar():
"""Intialization of core variables""" """Intialization of core variables"""
# WordOps version # WordOps version
wo_version = "3.12.3" wo_version = "3.12.4"
# WordOps packages versions # WordOps packages versions
wo_wp_cli = "2.4.0" wo_wp_cli = "2.4.0"
wo_adminer = "4.7.5" wo_adminer = "4.7.5"
@@ -111,6 +111,10 @@ class WOVar():
# Nginx repo and packages # Nginx repo and packages
if wo_distro == 'ubuntu': if wo_distro == 'ubuntu':
wo_nginx_repo = "ppa:wordops/nginx-wo" 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: else:
if wo_distro == 'debian': if wo_distro == 'debian':
if wo_platform_codename == 'jessie': if wo_platform_codename == 'jessie':