Welcome to Centmin Mod Community
Become a Member

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

    54,860
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    7:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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
     
  2. pamamolf

    pamamolf Premium Member Premium Member

    4,086
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    11:20 AM
    Nginx-1.25.x
    MariaDB 10.3.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

    54,860
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    7:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    it's same file already located in each nginx vhost public web root at /home/nginx/domains/domain.com/public/maintenance.html
     
  4. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    5:20 PM
    Mainline
    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

    54,860
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    7:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    why disable and comment it out ? out of box default it isn't used unless you run sitestatus off/on command
     
  6. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    5:20 PM
    Mainline
    10.2
    Found it now on php.conf
    location ~ \.php$ {
    #include /usr/local/nginx/conf/503include-only.conf;
     
  7. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    5:20 PM
    Mainline
    10.2
    Just want to minimize Nginx config :)
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,860
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    7:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    honestly i wouldn't start removing them.. centmin mod may in future rely on them for other anchors additions etc :)
     
  9. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    5:20 PM
    Mainline
    10.2
    I am reading all updates, so I should know when it comes :D.