Get the most out of your Centmin Mod LEMP stack
Become a Member

Post update, rerun centmin from src dir?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by ethanpil, May 20, 2017.

Tags:
  1. ethanpil

    ethanpil Active Member

    173
    55
    28
    Nov 8, 2015
    Ratings:
    +101
    Local Time:
    11:21 AM
    After updating centminmod code to latest version, lately I see

    Code:
    ##################### IMPORTANT #####################
     To complete update 
    ##################### IMPORTANT #####################
     run:
    
      cd /usr/local/src/centminmod
    
     before invoking centmin.sh again
    ##################### IMPORTANT #####################
    
    1. Why must we do this?
    2. Why cant script just move us to this dir so we can run it? without cd...
    3. Isnt there a way to remove this step?

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,209
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    11:21 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Because when a script is run, it's within a ssh session outside of your own ssh session. So what happens within a script stays within that script's session. That's just how bash shell scripts work. If you want less hassle just update using git command outlined at https://community.centminmod.com/th...updating-centmin-mod-via-git.3084/#post-27266

    git command equivalent of centmin.sh menu option 23 sub menu option 2 is
    Code (Text):
    cd /usr/local/src/centminmod
    git stash
    git pull
    

    or with command shortcut
    Code (Text):
    cmdir
    git stash
    git pull
    


    this is how i usually update Centmin Mod and how you use cronjob to auto update Centmin Mod which i also use https://community.centminmod.com/threads/cronjob-auto-updating-centmin-mod-code-guide.3398/ i set cronjob to auto update Centmin Mod every 8 hrs