Join the community today
Become a Member

Beta Branch update inc/wpsetup.inc

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jun 30, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    30,968
    6,919
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,422
    Local Time:
    10:27 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,968
    6,919
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,422
    Local Time:
    10:27 AM
    Nginx 1.13.x
    MariaDB 5.5
    for existing users who want to update their wordpress installs /root/tools/wp_updater_domain.com.sh update scripts where domain.com is your domain name for wordpress install, you can manually make changes to script

    find line
    Code (Text):
    /usr/bin/wp plugin update --all --allow-root
    

    replace with this line
    Code (Text):
    /usr/bin/wp plugin update --all --allow-root | tee .wpcli-status
    

    then find line
    Code (Text):
    /usr/bin/nprestart
    

    replace with
    Code (Text):
    if [[ -f .wpcli-status && ! "$(grep -w 'Plugin already updated' .wpcli-status)" ]]; then
      exec 99>/tmp/wp_updater_phpfpm.lock
      if flock -n -x 99; then
      /usr/bin/nprestart
      rm -rf /tmp/wp_updater_phpfpm.lock
      else
      echo "already detected running process"
      echo "skipping nprestart"
      fi
    fi
    rm -rf .wpcli-status