Join the community today
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

    168
    47
    28
    Nov 8, 2015
    Ratings:
    +87
    Local Time:
    3:08 PM
    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

    30,163
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    3:08 PM
    Nginx 1.13.x
    MariaDB 5.5
    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