From f7e039c35b552f553e8535871f8bdd51916d71f0 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 21 Aug 2019 17:32:24 +0200 Subject: [PATCH] Remove confirmation for update --- install | 61 ++++++++++++++++++++++++--------------------------------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/install b/install index 68e19a2..ecff6da 100755 --- a/install +++ b/install @@ -763,46 +763,37 @@ else # 1 - WO already installed if [ -x /usr/local/bin/wo ]; then if ! { - wo -v 2>&1 | grep "$wo_version_new" + wo -v 2>&1 | grep -q "$wo_version_new" } || [ "$wo_force_install" = "y" ]; then - if [ -z "$wo_force_install" ]; then - echo -e "Update WordOps to $wo_version_new (y/n): " && read -r WO_ANSWER + wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log + wo_install_dep | tee -ai $wo_install_log + wo_lib_echo "Backing-up WO install" | tee -ai $wo_install_log + wo_backup_wo | tee -ai $wo_install_log + secure_wo_db | tee -ai $wo_install_log + wo_lib_echo "Installing WordOps " | tee -ai $wo_install_log + wo_clean | tee -ai $wo_install_log + if [ "$wo_travis" = "y" ]; then + wo_install_travis | tee -ai $wo_install_log else - WO_ANSWER="y" - fi - if [ "$WO_ANSWER" = "y" ] || [ "$WO_ANSWER" = "Y" ]; then - wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log - wo_install_dep | tee -ai $wo_install_log - wo_lib_echo "Backing-up WO install" | tee -ai $wo_install_log - wo_backup_wo | tee -ai $wo_install_log - secure_wo_db | tee -ai $wo_install_log - wo_lib_echo "Installing WordOps " | tee -ai $wo_install_log - wo_clean | tee -ai $wo_install_log - if [ "$wo_travis" = "y" ]; then - wo_install_travis | tee -ai $wo_install_log + if [ -f "$HOME/.gitconfig" ]; then + wo_install >> $wo_install_log 2>&1 else - if [ -f "$HOME/.gitconfig" ]; then - wo_install >> $wo_install_log 2>&1 - else - wo_install | tee -ai $wo_install_log - fi + wo_install | tee -ai $wo_install_log fi - wo_update_latest | tee -ai $wo_install_log - if [ ! -d /opt/acme/.sh ]; then - wo_lib_echo "Updating acme.sh" | tee -ai $wo_install_log - wo_install_acme_sh | tee -ai $wo_install_log - fi - wo_lib_echo "Applying Kernel tweaks" | tee -ai $wo_install_log - wo_tweak_kernel | tee -ai $wo_install_log - if [ ! -f /opt/wo-kernel.sh ]; then - wo_lib_echo "Adding systemd service tweak" | tee -ai $wo_install_log - wo_systemd_tweak | tee -ai $wo_install_log - fi - wo_lib_echo "Running post-install steps " | tee -ai $wo_install_log - wo_update_wp_cli | tee -ai $wo_install_log - else - wo_lib_error "Not updating WordOps to $wo_version_new, exit status = " 1 fi + wo_update_latest | tee -ai $wo_install_log + if [ ! -d /opt/acme/.sh ]; then + wo_lib_echo "Updating acme.sh" | tee -ai $wo_install_log + wo_install_acme_sh | tee -ai $wo_install_log + fi + wo_lib_echo "Applying Kernel tweaks" | tee -ai $wo_install_log + wo_tweak_kernel | tee -ai $wo_install_log + if [ ! -f /opt/wo-kernel.sh ]; then + wo_lib_echo "Adding systemd service tweak" | tee -ai $wo_install_log + wo_systemd_tweak | tee -ai $wo_install_log + fi + wo_lib_echo "Running post-install steps " | tee -ai $wo_install_log + wo_update_wp_cli | tee -ai $wo_install_log else wo_lib_error "You already have WordOps $wo_version_new, exit status = " 1 fi