Welcome to Centmin Mod Community
Register Now

Beta Branch Add maintenance mode variables for nginx, php and mariadb updates

Discussion in 'Centmin Mod Github Commits' started by eva2000, Feb 14, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    30,132
    6,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,128
    Local Time:
    12:10 PM
    Nginx 1.13.x
    MariaDB 5.5
    Add maintenance mode variables for nginx, php and mariadb updates

    Added support for 3 new variables:
    Code:
    NGINX_UPDATEMAINTENANCE=n
    PHP_UPDATEMAINTENANCE=n
    MARIADB_UPDATEMAINTENANCE=n
    
    If you set to yes in /etc/centminmod/custom_config.inc file. then whenever you run nginx, php or major mariadb upgrade, you put all sites on server into 503 maintenance mode first https://community.centminmod.com/posts/26485/ and once updated, disable 503 maintenance mod after.

    set in newly created or existing /etc/centminmod/custom_config.inc persistent config file
    Code:
    NGINX_UPDATEMAINTENANCE=y
    PHP_UPDATEMAINTENANCE=y
    MARIADB_UPDATEMAINTENANCE=y
    
    Continue reading...

    123.09beta01 branch
     
    • Like Like x 1
  2. pamamolf

    pamamolf Well-Known Member

    2,720
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    5:10 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Where is this file located in case that we need to edit it with another type of message?
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,132
    6,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,128
    Local Time:
    12:10 PM
    Nginx 1.13.x
    MariaDB 5.5
    it's same file already located in each nginx vhost public web root at /home/nginx/domains/domain.com/public/maintenance.html
     
  4. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:10 AM
    1.11
    10.2
    Latest 09btea new install.
    When I comment out: #include /usr/local/nginx/conf/maintenance.conf;
    Can't start Nginx with this error:
    Where can I remove that variable?
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,132
    6,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,128
    Local Time:
    12:10 PM
    Nginx 1.13.x
    MariaDB 5.5
    why disable and comment it out ? out of box default it isn't used unless you run sitestatus off/on command
     
  6. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:10 AM
    1.11
    10.2
    Found it now on php.conf
    location ~ \.php$ {
    #include /usr/local/nginx/conf/503include-only.conf;
     
  7. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:10 AM
    1.11
    10.2
    Just want to minimize Nginx config :)
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,132
    6,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,128
    Local Time:
    12:10 PM
    Nginx 1.13.x
    MariaDB 5.5
    honestly i wouldn't start removing them.. centmin mod may in future rely on them for other anchors additions etc :)
     
  9. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    10:10 AM
    1.11
    10.2
    I am reading all updates, so I should know when it comes :D.