Welcome to Centmin Mod Community
Become a Member

2 WP-CLI Auto Update emails

Discussion in 'Bug Reports' started by raciasolvo, Oct 19, 2016.

  1. raciasolvo

    raciasolvo Member

    98
    10
    8
    Oct 7, 2016
    Ratings:
    +27
    Local Time:
    6:13 AM
    Nginx 1.11.6
    MariaDB 10.0.27
    I receive 2 WP-CLI Auto Update emails with same body. Diff:
    Code (Text):
    < Restarting nginx (via systemctl):  [  OK  ]
    ---
    > Restarting nginx (via systemctl):  [  OK  ]^M

    Code (Text):
    < From: "(Cron Daemon)" <root@server.domain.tld>
    ---
    > From: admin@email.addr

    Code (Text):
    < Subject: Cron <root@hostname> sleep 218s ;/root/tools/wp_updater_${VHOSTNAME} 2>/dev/null
    ---
    > Subject: Wordpress WP-CLI Auto Update Tue Oct 18 16:03:45 UTC 2016

    Bug or feature?
    123.09beta01
     
    Last edited: Oct 19, 2016
    • Informative Informative x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,905
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,404
    Local Time:
    1:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    same date in subject ?
     
  3. raciasolvo

    raciasolvo Member

    98
    10
    8
    Oct 7, 2016
    Ratings:
    +27
    Local Time:
    6:13 AM
    Nginx 1.11.6
    MariaDB 10.0.27
    5s diff
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,905
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,404
    Local Time:
    1:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    that's weird check your cronjobs if there are not duplicates listed

    list cronjobs
    Code (Text):
    crontab -l

    edit cronjobs via nano text editor
    Code (Text):
    crontab -e

    save and exit nano type CTRL+X
     
  5. raciasolvo

    raciasolvo Member

    98
    10
    8
    Oct 7, 2016
    Ratings:
    +27
    Local Time:
    6:13 AM
    Nginx 1.11.6
    MariaDB 10.0.27
    no problem with duplicates.
    First email from cron:
    Code (Text):
    Auto-Submitted: auto-generated
    Precedence: bulk
    X-Cron-Env: <XDG_SESSION_ID=8061>
    X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/0>
    X-Cron-Env: <LANG=en_US.UTF-8>
    X-Cron-Env: <SHELL=/bin/sh>
    X-Cron-Env: <HOME=/root>
    X-Cron-Env: <PATH=/usr/bin:/bin>
    X-Cron-Env: <LOGNAME=root>
    X-Cron-Env: <USER=root>

    Second email from script?
    Code (Text):
    User-Agent: Heirloom mailx 12.5 7/5/10
     
    • Informative Informative x 1
  6. raciasolvo

    raciasolvo Member

    98
    10
    8
    Oct 7, 2016
    Ratings:
    +27
    Local Time:
    6:13 AM
    Nginx 1.11.6
    MariaDB 10.0.27
    Yes, second email from script:
    Code (Text):
    cat -v /home/nginx/domains/_______/log/wp_updater-${DT}.log | /usr/bin/tr -cd '\11\12\15\40-\176' | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | dos2unix | mail -r $EMAILFROM -s "Wordpress WP-CLI Auto Update $(date)" $EMAIL
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,905
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,404
    Local Time:
    1:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    ah i believe need to silence the cronjob script itself so

    change
    Code (Text):
    sleep 218s ;/root/tools/wp_updater_${VHOSTNAME} 2>/dev/null

    to
    Code (Text):
    sleep 218s ;/root/tools/wp_updater_${VHOSTNAME} >/dev/null 2>&1
     
  8. raciasolvo

    raciasolvo Member

    98
    10
    8
    Oct 7, 2016
    Ratings:
    +27
    Local Time:
    6:13 AM
    Nginx 1.11.6
    MariaDB 10.0.27
    or?
    Code (Text):
    > /dev/null 2>&1
     
    • Like Like x 1
  9. eva2000

    eva2000 Administrator Staff Member

    30,905
    6,908
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,404
    Local Time:
    1:13 PM
    Nginx 1.13.x
    MariaDB 5.5
    oops typo forgot the >

    edited above post :) and updating 123.09beta01 with the fix :)
     
    • Like Like x 1