update install script and travis
This commit is contained in:
18
.travis.yml
18
.travis.yml
@@ -13,7 +13,12 @@ before_script:
|
||||
- sudo bash -c 'echo example.com > /etc/hostname'
|
||||
- sudo apt-get -qq purge mysql* graphviz*
|
||||
- sudo apt-get -qq autoremove --purge
|
||||
- sudo apt-get update
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
|
||||
git:
|
||||
quiet: true
|
||||
|
||||
script:
|
||||
- lsb_release -a
|
||||
@@ -21,13 +26,8 @@ script:
|
||||
- sudo bash -c 'echo -e "[user]\n\tname = abc\n\temail = root@localhost.com" > /home/travis/.gitconfig'
|
||||
- sudo echo "Travis Banch = $TRAVIS_BRANCH"
|
||||
- sudo apt-get install -y --force-yes git python3-setuptools python3-dev python3-apt ccze tree
|
||||
- sudo bash wo.sh $TRAVIS_BRANCH
|
||||
- sudo wo --help
|
||||
|
||||
- sudo wo stack install || sudo tail -n50 /var/log/wo/wordops.log
|
||||
- sudo wo stack install --admin || sudo tail -n50 /var/log/wo/wordops.log
|
||||
|
||||
- sudo wo site create wp-php73.net --wp --php73 || sudo tail -n50 /var/log/wo/wordops.log
|
||||
- sudo bash install $TRAVIS_BRANCH
|
||||
- sudo wo --help && sudo wo stack install && sudo wo stack install --admin
|
||||
|
||||
- sudo wo site create html.net --html && sudo wo site create php.com --php && sudo wo site create mysql.com --mysql || sudo tail -n50 /var/log/wo/wordops.log
|
||||
- sudo wo site create proxy.com --proxy=127.0.0.1:3000 || sudo tail -n50 /var/log/wo/wordops.log
|
||||
@@ -60,6 +60,4 @@ script:
|
||||
- sudo ls /var/www/
|
||||
- sudo wp --allow-root --info
|
||||
- sudo wo info || sudo tail -n50 /var/log/wo/wordops.log
|
||||
- sudo bash -c 'nginx -T 2>&1 > /var/log/wo/nginx.log 2>&1' || sudo tail -n50 /var/log/wo/wordops.log
|
||||
- sudo bash -c 'tar -I pigz -cf wordops.tar.gz /var/log/wo'
|
||||
- sudo tree -L 2 /etc/nginx
|
||||
|
||||
@@ -39,6 +39,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
- Increase MySQL users password size to 16 characters
|
||||
- Nginx locations template is the same for php7.2 & 7.3
|
||||
- refactor install script
|
||||
- backend SSL configuration now stored in /var/www/22222/conf/nginx/ssl.conf
|
||||
|
||||
|
||||
#### Fixed
|
||||
|
||||
|
||||
11
install
11
install
@@ -7,7 +7,7 @@
|
||||
# Copyright (c) 2019 - WordOps
|
||||
# This script is licensed under M.I.T
|
||||
# -------------------------------------------------------------------------
|
||||
# Version 3.9.5 - 2019-04-10
|
||||
# Version 3.9.5 - 2019-04-14
|
||||
# -------------------------------------------------------------------------
|
||||
readonly wo_version_old="2.2.3"
|
||||
readonly wo_version_new="3.9.4.5"
|
||||
@@ -379,11 +379,14 @@ wo_install_acme_sh() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Now, finally, let's install WordOps
|
||||
# Clone Github repository if it doesn't exist
|
||||
wo_install() {
|
||||
{
|
||||
if [ ! -d /tmp/WordOps ]; then
|
||||
if [ ! -d /tmp/WordOps/.git ]; then
|
||||
rm -rf /tmp/WordOps
|
||||
git clone https://github.com/WordOps/WordOps.git /tmp/WordOps -b "$wo_branch"
|
||||
else
|
||||
git -C /tmp/WordOps pull
|
||||
fi
|
||||
cd /tmp/WordOps || exit 1
|
||||
} >> "$wo_install_log" 2>&1
|
||||
@@ -597,7 +600,7 @@ wo_backup_ee() {
|
||||
}
|
||||
|
||||
wo_backup_wo() {
|
||||
tar -I pigz -cf "$WO_BACKUP_FILE" /etc/nginx/ /usr/local/lib/python3.6/dist-packages/wo-*.egg /etc/wo >> /var/log/wo/install.log 2>&1
|
||||
tar -I pigz -cf "$WO_BACKUP_FILE" /etc/nginx/ /usr/local/lib/python3.6/dist-packages/wo-*.egg /etc/wo /var/lib/wo >> /var/log/wo/install.log 2>&1
|
||||
}
|
||||
|
||||
wo_clean_ee() {
|
||||
|
||||
47
wo.sh
47
wo.sh
@@ -1,47 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# -------------------------------------------------------------------------
|
||||
# WordOps install script downloader
|
||||
# -------------------------------------------------------------------------
|
||||
# Website: https://wordops.net
|
||||
# GitHub: https://github.com/WordOps/WordOps
|
||||
# Copyright (c) 2019 - WordOps
|
||||
# This script is licensed under M.I.T
|
||||
# -------------------------------------------------------------------------
|
||||
# Version 3.9.5 - 2019-04-10
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
###
|
||||
# 1 - Check whether the installation is called with elevated rights
|
||||
###
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
wo_lib_echo_fail "Sudo privilege required..."
|
||||
wo_lib_echo_fail "Use: curl -sL wops.cc | sudo bash"
|
||||
exit 100
|
||||
fi
|
||||
|
||||
# check if git is installed
|
||||
[ -z "$(command -v git)" ] && {
|
||||
apt-get update -qq && apt-get install git -qq
|
||||
} > /dev/null 2>&1
|
||||
|
||||
# set github repository branch
|
||||
if [ -n "$1" ]; then
|
||||
wo_branch="$1"
|
||||
else
|
||||
wo_branch=master
|
||||
fi
|
||||
|
||||
# update or clone wordops repositoru
|
||||
if [ -d /tmp/WordOps/.git ]; then
|
||||
git -C /tmp/WordOps fetch --all
|
||||
git -C /tmp/WordOps reset --hard origin/${wo_branch}
|
||||
git -C /tmp/WordOps clean -f
|
||||
else
|
||||
rm -rf /tmp/WordOps
|
||||
git clone https://github.com/WordOps/WordOps.git /tmp/WordOps -b "$wo_branch" -q
|
||||
fi
|
||||
|
||||
# execute install script
|
||||
if [ -x /tmp/WordOps/install ]; then
|
||||
/tmp/WordOps/install
|
||||
fi
|
||||
@@ -14,7 +14,8 @@ class WOStackStatusController(CementBaseController):
|
||||
description = 'Check the stack status'
|
||||
arguments = [
|
||||
(['--memcached'],
|
||||
dict(help='start/stop/restart memcached', action='store_true')),
|
||||
dict(help='start/stop/restart memcached',
|
||||
action='store_true')),
|
||||
]
|
||||
|
||||
@expose(help="Start stack services")
|
||||
@@ -186,7 +187,8 @@ class WOStackStatusController(CementBaseController):
|
||||
if ((WOVariables.wo_mysql_host is "localhost") or
|
||||
(WOVariables.wo_mysql_host is "127.0.0.1")):
|
||||
if ((WOAptGet.is_installed(self, 'mysql-server') or
|
||||
WOAptGet.is_installed(self, 'percona-server-server-5.6') or
|
||||
WOAptGet.is_installed(self,
|
||||
'percona-server-server-5.6') or
|
||||
WOAptGet.is_installed(self, 'mariadb-server'))):
|
||||
services = services + ['mysql']
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user