Merge pull request #124 from WordOps/updating-configuration
Updating configuration
This commit is contained in:
23
install
23
install
@@ -851,7 +851,11 @@ else
|
|||||||
if [ "$wo_travis" = "y" ]; then
|
if [ "$wo_travis" = "y" ]; then
|
||||||
wo_install_travis | tee -ai $wo_install_log
|
wo_install_travis | tee -ai $wo_install_log
|
||||||
else
|
else
|
||||||
wo_install | tee -ai $wo_install_log
|
if [ -f "$HOME/.gitconfig" ]; then
|
||||||
|
wo_install >> $wo_install_log 2>&1
|
||||||
|
else
|
||||||
|
wo_install | tee -ai $wo_install_log
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$ufw" = "y" ]; then
|
if [ "$ufw" = "y" ]; then
|
||||||
wo_lib_echo "Configuring UFW" | tee -ai $wo_install_log
|
wo_lib_echo "Configuring UFW" | tee -ai $wo_install_log
|
||||||
@@ -872,7 +876,7 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wo sync | tee -ai $wo_install_log
|
wo sync >> $wo_install_log 2>&1
|
||||||
|
|
||||||
if [ "$ee_migration" = "1" ]; then
|
if [ "$ee_migration" = "1" ]; then
|
||||||
echo
|
echo
|
||||||
@@ -881,13 +885,22 @@ else
|
|||||||
echo
|
echo
|
||||||
elif [ "$wo_upgrade" = "1" ]; then
|
elif [ "$wo_upgrade" = "1" ]; then
|
||||||
wo_lib_echo "WordOps (wo) upgrade to $wo_version_new was succesfull!"
|
wo_lib_echo "WordOps (wo) upgrade to $wo_version_new was succesfull!"
|
||||||
|
echo
|
||||||
|
wo_lib_echo "To upgrade Nginx use the command:"
|
||||||
|
wo_lib_echo_info "wo stack upgrade --nginx"
|
||||||
|
echo
|
||||||
|
wo_lib_echo "To update other packages use the command:"
|
||||||
|
wo_lib_echo_info "wo stack maintenance"
|
||||||
else
|
else
|
||||||
wo_lib_echo "WordOps (wo) installed successfully"
|
wo_lib_echo "WordOps (wo) installed successfully"
|
||||||
|
echo
|
||||||
|
wo_lib_echo "For autocompletion, run the following command:"
|
||||||
|
wo_lib_echo_info "source /etc/bash_completion.d/wo_auto.rc"
|
||||||
|
echo
|
||||||
|
wo_lib_echo "To install WordOps main stacks, use the command:"
|
||||||
|
wo_lib_echo_info "wo stack install"
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
wo_lib_echo_info "For autocompletion, run the following command:"
|
|
||||||
wo_lib_echo_info "source /etc/bash_completion.d/wo_auto.rc"
|
|
||||||
echo
|
|
||||||
wo_lib_echo "WordOps Documentation : https://docs.wordops.net"
|
wo_lib_echo "WordOps Documentation : https://docs.wordops.net"
|
||||||
wo_lib_echo "WordOps Community Forum : https://community.wordops.net"
|
wo_lib_echo "WordOps Community Forum : https://community.wordops.net"
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from wo.core.logging import Log
|
|||||||
from wo.core.services import WOService
|
from wo.core.services import WOService
|
||||||
from wo.core.shellexec import WOShellExec
|
from wo.core.shellexec import WOShellExec
|
||||||
from wo.core.variables import WOVariables
|
from wo.core.variables import WOVariables
|
||||||
from wo.cli.plugins.stack_pref import post_pref
|
from wo.cli.plugins.stack_pref import pre_pref, post_pref
|
||||||
|
|
||||||
|
|
||||||
class WOStackUpgradeController(CementBaseController):
|
class WOStackUpgradeController(CementBaseController):
|
||||||
@@ -62,6 +62,7 @@ class WOStackUpgradeController(CementBaseController):
|
|||||||
# All package update
|
# All package update
|
||||||
apt_packages = []
|
apt_packages = []
|
||||||
packages = []
|
packages = []
|
||||||
|
nginx_packages = []
|
||||||
empty_packages = []
|
empty_packages = []
|
||||||
pargs = pargs = self.app.pargs
|
pargs = pargs = self.app.pargs
|
||||||
|
|
||||||
@@ -89,6 +90,7 @@ class WOStackUpgradeController(CementBaseController):
|
|||||||
if pargs.nginx:
|
if pargs.nginx:
|
||||||
if WOAptGet.is_installed(self, 'nginx-custom'):
|
if WOAptGet.is_installed(self, 'nginx-custom'):
|
||||||
apt_packages = apt_packages + WOVariables.wo_nginx
|
apt_packages = apt_packages + WOVariables.wo_nginx
|
||||||
|
nginx_packages = nginx_packages + WOVariables.wo_nginx
|
||||||
else:
|
else:
|
||||||
Log.info(self, "Nginx Stable is not already installed")
|
Log.info(self, "Nginx Stable is not already installed")
|
||||||
|
|
||||||
@@ -181,6 +183,8 @@ class WOStackUpgradeController(CementBaseController):
|
|||||||
if start_upgrade != "Y" and start_upgrade != "y":
|
if start_upgrade != "Y" and start_upgrade != "y":
|
||||||
Log.error(self, "Not starting package update")
|
Log.error(self, "Not starting package update")
|
||||||
Log.info(self, "Updating APT packages, please wait...")
|
Log.info(self, "Updating APT packages, please wait...")
|
||||||
|
if set(WOVariables.wo_nginx).issubset(set(apt_packages)):
|
||||||
|
pre_pref(self, nginx_packages)
|
||||||
# apt-get update
|
# apt-get update
|
||||||
WOAptGet.update(self)
|
WOAptGet.update(self)
|
||||||
if set(WOVariables.wo_php).issubset(set(apt_packages)):
|
if set(WOVariables.wo_php).issubset(set(apt_packages)):
|
||||||
|
|||||||
Reference in New Issue
Block a user