Added smtp-cli, some smaller improvements
This commit is contained in:
@@ -5,5 +5,6 @@ v3.9.0 - November 11, 2018
|
|||||||
[+] Set PHP 7.2 as the default
|
[+] Set PHP 7.2 as the default
|
||||||
[+] Included support for newer OS releases
|
[+] Included support for newer OS releases
|
||||||
[+] Reworked the HTTPS configuration
|
[+] Reworked the HTTPS configuration
|
||||||
|
[=] Replaced Postfix with smtp-cli
|
||||||
[-] Dropped mail services
|
[-] Dropped mail services
|
||||||
[-] Dropped w3tc support
|
[-] Dropped w3tc support
|
||||||
85
backup
Normal file
85
backup
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#############################
|
||||||
|
### WordOps backup script ###
|
||||||
|
#############################
|
||||||
|
|
||||||
|
# Blue
|
||||||
|
function wo_lib_echo()
|
||||||
|
{
|
||||||
|
echo $(tput setaf 4)$@$(tput sgr0)
|
||||||
|
}
|
||||||
|
# White
|
||||||
|
function wo_lib_echo_info()
|
||||||
|
{
|
||||||
|
echo $(tput setaf 7)$@$(tput sgr0)
|
||||||
|
}
|
||||||
|
# Red
|
||||||
|
function wo_lib_echo_fail()
|
||||||
|
{
|
||||||
|
echo $(tput setaf 1)$@$(tput sgr0)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check whether we are running as UID 0
|
||||||
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
wo_lib_echo_fail "WordOps backup requires elevated privileges"
|
||||||
|
wo_lib_echo_fail "Call it as root: wget -qO backup wordops.se/curedata && sudo bash backup"
|
||||||
|
exit 100
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Capture errors
|
||||||
|
function wo_lib_error()
|
||||||
|
{
|
||||||
|
echo "[ `date` ] $(tput setaf 1)$@$(tput sgr0)"
|
||||||
|
exit $2
|
||||||
|
}
|
||||||
|
|
||||||
|
# Define variables for later use
|
||||||
|
wo_branch=$1
|
||||||
|
readonly wo_log_dir=/var/log/wo/
|
||||||
|
readonly wo_backup_log=/var/log/wo/backup.log
|
||||||
|
readonly wo_linux_distro=$(lsb_release -i | awk '{print $3}')
|
||||||
|
readonly wo_distro_version=$(lsb_release -sc)
|
||||||
|
|
||||||
|
# Checking linux distro
|
||||||
|
if [ "$wo_linux_distro" != "Ubuntu" ] && [ "$wo_linux_distro" != "Debian" ]; then
|
||||||
|
wo_lib_echo_fail "WordOps (wo) only supports Ubuntu and Debian at the moment."
|
||||||
|
wo_lib_echo_fail "If you are feeling adventurous, you are free to fork WordOps to support"
|
||||||
|
wo_lib_echo_fail "other Linux distributions and perhaps even Unix deratives."
|
||||||
|
wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 14.04/16.04/18.04, Debian 8.x and Debian 9.x"
|
||||||
|
exit 100
|
||||||
|
fi
|
||||||
|
|
||||||
|
# WordOps (wo) only supports Ubuntu/Debian versions that are eligible for support
|
||||||
|
lsb_release -d | egrep -e "14.04|16.04|18.04|jessie|stretch" &>> /dev/null
|
||||||
|
if [ "$?" -ne "0" ]; then
|
||||||
|
wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 14.04/16.04/18.04, Debian 8.x and Debian 9.x"
|
||||||
|
exit 100
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check whether the log file is in place and otherwise create it
|
||||||
|
if [ ! -f $wo_backup_log ]; then
|
||||||
|
|
||||||
|
wo_lib_echo "Creating the WordOps (wo) backup log, just a second..."
|
||||||
|
|
||||||
|
# Touch/create two empty log files within the wo_log_dir
|
||||||
|
touch /var/log/wo/backup.log
|
||||||
|
|
||||||
|
# Set the ACL to only allow access by the root user and block others
|
||||||
|
chmod 700 /var/log/wo/backup.log || wo_lib_error "Whoops, there was an error setting the permissions on the WordOps (wo) backup log file, exit status " $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
function wo_install_duplicity()
|
||||||
|
{
|
||||||
|
if [ ! -f $wo_duplicity_bin ]; then
|
||||||
|
if [ "$wo_linux_distro" == "Ubuntu" ]; then
|
||||||
|
apt-get -y install duplicity python-pip || wo_lib_error "There was an error during dependency installation, exit status " 1
|
||||||
|
elif [ "$wo_linux_distro" == "Debian" ]; then
|
||||||
|
apt-get -y install duplicity python-pip || wo_lib_error "There was an error during dependency installation, exit status " 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function wo_backup_databases()
|
||||||
|
{
|
||||||
|
#
|
||||||
|
}
|
||||||
1074
smtp-cli.pl
Normal file
1074
smtp-cli.pl
Normal file
File diff suppressed because it is too large
Load Diff
@@ -158,7 +158,7 @@ class WOStackController(CementBaseController):
|
|||||||
WORepo.add_key(self, WOVariables.wo_nginx_key)
|
WORepo.add_key(self, WOVariables.wo_nginx_key)
|
||||||
|
|
||||||
if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic'):
|
if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic'):
|
||||||
if set(WOVariables.wo_php7_0).issubset(set(apt_packages)) \
|
if set(WOVariables.wo_php7_2).issubset(set(apt_packages)) \
|
||||||
or set(WOVariables.wo_php5_6).issubset(set(apt_packages)):
|
or set(WOVariables.wo_php5_6).issubset(set(apt_packages)):
|
||||||
Log.info(self, "Adding repository for PHP, please wait...")
|
Log.info(self, "Adding repository for PHP, please wait...")
|
||||||
Log.debug(self, 'Adding ppa for PHP')
|
Log.debug(self, 'Adding ppa for PHP')
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class WOVariables():
|
|||||||
# WordOps default webroot path
|
# WordOps default webroot path
|
||||||
wo_webroot = '/var/www/'
|
wo_webroot = '/var/www/'
|
||||||
|
|
||||||
# PHP5 user
|
# PHP user
|
||||||
wo_php_user = 'www-data'
|
wo_php_user = 'www-data'
|
||||||
|
|
||||||
# Get git user name and EMail
|
# Get git user name and EMail
|
||||||
|
|||||||
Reference in New Issue
Block a user