Welcome to Centmin Mod Community
Register Now

centmin.sh Weird output on first login to server after reboot

Discussion in 'Bug Reports' started by BamaStangGuy, Jun 24, 2022.

  1. BamaStangGuy

    BamaStangGuy Active Member

    664
    191
    43
    May 25, 2014
    Ratings:
    +270
    Local Time:
    2:32 PM
    Every time I reboot the server and on the first login to the server after a reboot, I get this on login. It only happens after a reboot. If I exit and then log back in it does not happen.


    centminmodonboot.png
     
  2. eva2000

    eva2000 Administrator Staff Member

    49,221
    11,291
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,566
    Local Time:
    5:32 AM
    Nginx 1.21.x
    MariaDB 10.x
  3. eva2000

    eva2000 Administrator Staff Member

    49,221
    11,291
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,566
    Local Time:
    5:32 AM
    Nginx 1.21.x
    MariaDB 10.x
    Ok I tried DMOTD_PHPCHECK='y' in persistent config file and server reboot and not seeing the issue. To debug this I manually edited /usr/local/bin/dmotd line 178 so it runs in debug mode outputting the run from getphpver command

    line 178 has
    Code (Text):
    LASTEST_PHPVERS=$(getphpver "$(php-config --version | awk -F '.' '{print $1$2}')")

    change it to below adding bash -x in front of getphpver command (might ad a variable to do this more easily in future :))
    Code (Text):
    LASTEST_PHPVERS=$(bash -x getphpver "$(php-config --version | awk -F '.' '{print $1$2}')")

    save file
    and then reboot server and do first time SSH login

    I got expected no error run output from debug mode
    Code (Text):
    + phpversions=/tmp/phpversions.txt
    + '[' '!' -f /usr/bin/jq ']'
    + case "$1" in
    + getversions 81
    + phpver_tag=81
    + '[' -f /tmp/phpversions.txt ']'
    + phpfile_age=7201
    + [[ 7201 -gt 7200 ]]
    + echo
    + curl -s 'https://api.github.com/repos/php/php-src/tags?per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=2&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=3&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=4&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=5&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=6&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=7&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=8&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=9&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=10&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=11&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=12&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + curl -s 'https://api.github.com/repos/php/php-src/tags?page=13&per_page=500'
    + jq -r '.[].name'
    + grep php-
    + egrep -iv 'alpha|beta|rc'
    + [[ 81 = \a\l\l ]]
    + [[ 81 = \8\1 ]]
    + cat /tmp/phpversions.txt
    + grep -m1 8.1.
    + sed -e 's|php-||'
    
     
  4. BamaStangGuy

    BamaStangGuy Active Member

    664
    191
    43
    May 25, 2014
    Ratings:
    +270
    Local Time:
    2:32 PM
    Well, if I come across it again I will let you know. It seems to have gone away on its own lol