Add more tests into travis
This commit is contained in:
35
install
35
install
@@ -623,37 +623,6 @@ wo_update_latest() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Do git intialisation
|
|
||||||
wo_git_init() {
|
|
||||||
# Nginx under git version control
|
|
||||||
[ -d /etc/nginx ] && {
|
|
||||||
cd /etc/nginx || exit 1
|
|
||||||
[ ! -d /etc/nginx/.git ] && {
|
|
||||||
git init
|
|
||||||
}
|
|
||||||
git add -A .
|
|
||||||
git commit -am "Updated Nginx"
|
|
||||||
}
|
|
||||||
# WordOps under git version control
|
|
||||||
[ -d /etc/wo ] && {
|
|
||||||
cd /etc/wo || exit 1
|
|
||||||
[ ! -d /etc/wo/.git ] && {
|
|
||||||
git init
|
|
||||||
}
|
|
||||||
git add -A .
|
|
||||||
git commit -am "Installed/Updated to WordOps"
|
|
||||||
}
|
|
||||||
# PHP under git version control
|
|
||||||
[ -d /etc/php ] && {
|
|
||||||
cd /etc/php || exit 1
|
|
||||||
[ ! -d /etc/php/.git ] && {
|
|
||||||
git init
|
|
||||||
}
|
|
||||||
git add -A .
|
|
||||||
git commit -am "Updated PHP"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wo_backup_ee() {
|
wo_backup_ee() {
|
||||||
if [ -d /etc/nginx ]; then
|
if [ -d /etc/nginx ]; then
|
||||||
local EE_NGINX="/etc/nginx"
|
local EE_NGINX="/etc/nginx"
|
||||||
@@ -860,10 +829,10 @@ else
|
|||||||
# _run wo_ufw_setup "Configuring UFW"
|
# _run wo_ufw_setup "Configuring UFW"
|
||||||
#fi
|
#fi
|
||||||
# skip steps if travis
|
# skip steps if travis
|
||||||
|
_run wo_download "Downloading WordOps"
|
||||||
if [ -z "$wo_travis" ]; then
|
if [ -z "$wo_travis" ]; then
|
||||||
_run wo_dist_upgrade
|
_run wo_dist_upgrade
|
||||||
_run wo_download "Downloading WordOps"
|
wo_git_config
|
||||||
wo_git_config
|
|
||||||
_run wo_install "Installing WordOps"
|
_run wo_install "Installing WordOps"
|
||||||
else
|
else
|
||||||
_run wo_install_travis "Installing WordOps"
|
_run wo_install_travis "Installing WordOps"
|
||||||
|
|||||||
@@ -17,7 +17,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 mysql redis fail2ban clamav proftpd netdata phpmyadmin composer dashboard extplorer adminer redis phpredisadmin mysqltuner utils'
|
stack_list='nginx php php73 mysql redis fail2ban clamav proftpd netdata phpmyadmin composer dashboard extplorer adminer redis phpredisadmin mysqltuner utils ufw'
|
||||||
for stack in $stack_list; do
|
for stack in $stack_list; do
|
||||||
echo -ne " Installing $stack [..]\r"
|
echo -ne " Installing $stack [..]\r"
|
||||||
if {
|
if {
|
||||||
@@ -150,9 +150,46 @@ for stack in $stack_upgrade; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo -e "${CGREEN}#############################################${CEND}"
|
||||||
|
echo -e ' wo clean '
|
||||||
|
echo -e "${CGREEN}#############################################${CEND}"
|
||||||
|
stack_clean='fastcgi redis opcache all'
|
||||||
|
for stack in $stack_clean; do
|
||||||
|
echo -ne " cleaning $stack cache [..]\r"
|
||||||
|
if {
|
||||||
|
wo stack clean --${stack}
|
||||||
|
} >> /var/log/wo/test.log; then
|
||||||
|
echo -ne " cleaning $stack cache [${CGREEN}OK${CEND}]\\r"
|
||||||
|
echo -ne '\n'
|
||||||
|
else
|
||||||
|
echo -e " cleaning $stack cache [${CRED}FAIL${CEND}]"
|
||||||
|
echo -ne '\n'
|
||||||
|
exit_script
|
||||||
|
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -e "${CGREEN}#############################################${CEND}"
|
||||||
|
echo -e ' wo stack purge '
|
||||||
|
echo -e "${CGREEN}#############################################${CEND}"
|
||||||
|
stack_purge='nginx php php73 mysql redis fail2ban clamav proftpd netdata phpmyadmin composer dashboard extplorer adminer redis ufw'
|
||||||
|
for stack in $stack_purge; do
|
||||||
|
echo -ne " purging $stack [..]\r"
|
||||||
|
if {
|
||||||
|
wo stack purge --${stack} --force
|
||||||
|
} >> /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
|
||||||
|
done
|
||||||
|
|
||||||
echo -e "${CGREEN}#############################################${CEND}"
|
echo -e "${CGREEN}#############################################${CEND}"
|
||||||
echo -e ' various informations '
|
echo -e ' various informations '
|
||||||
echo -e "${CGREEN}#############################################${CEND}"
|
echo -e "${CGREEN}#############################################${CEND}"
|
||||||
wp --allow-root --info
|
wp --allow-root --info
|
||||||
wo site info wp1.com
|
wo site info wp.net
|
||||||
wo stack purge --all --force
|
|
||||||
Reference in New Issue
Block a user