Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

/scripts/find_outdated_services broken?

Discussion in 'General Discussion' started by Michael-Inet, Dec 4, 2018.

  1. Michael-Inet

    Michael-Inet Well-Known Member

    Joined:
    Feb 20, 2014
    Messages:
    64
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    Austin, TX, USA
    cPanel Access Level:
    Root Administrator
    what/where is the /bin/needs-restarting script called now?

    If it is /scripts/find_outdated_services , that script is broken and reports "The system did not find any outdated services." while WHM » Security Center » Security Advisor shows the proper output.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,350
    Likes Received:
    62
    Trophy Points:
    178
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    /usr/bin/needs-restarting might work for you.

    Mike
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Michael-Inet

    Michael-Inet Well-Known Member

    Joined:
    Feb 20, 2014
    Messages:
    64
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    Austin, TX, USA
    cPanel Access Level:
    Root Administrator
    Thanks Mike,

    So it's moved to /usr? Unfortunately I fixed my 'needs restarts,' so I can’t test it fully, but if that’s now the right script it has its own issues as it outputs nothing. :(
    Code:
    root@srv03 [~]# /usr/bin/needs-restarting
    root@srv03 [~]#
    Best,
    Michael
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. ES - George

    ES - George Well-Known Member PartnerNOC

    Joined:
    Jun 12, 2011
    Messages:
    175
    Likes Received:
    22
    Trophy Points:
    68
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    That is the desired output, as it means that nothing needs restarting. It will only populate if there's something that needs restarting, like so:

    Code:
    # needs-restarting
    3872266 : /usr/sbin/wsshdict -c /etc/imunify360-webshield/webshield-shdict.conf
    779 : /usr/lib/polkit-1/polkitd --no-debug
    3045929 : /usr/local/jetapps/usr/bin/mongod --quiet -f /usr/local/jetapps/etc/mongod.conf run
    1 : /usr/lib/systemd/systemd --system --deserialize 20
    541 : /usr/lib/systemd/systemd-journald
    657350 : cpsrvd (SSL) - waiting for connections
    3397853 : /usr/lib/systemd/systemd-udevd
    807 : /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
    815 : /usr/sbin/chronyd
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Michael-Inet

    Michael-Inet Well-Known Member

    Joined:
    Feb 20, 2014
    Messages:
    64
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    Austin, TX, USA
    cPanel Access Level:
    Root Administrator
    Ah, no. That’s the definition of a broken script.

    Telling the user nothing is never a desired output. Think about it...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,815
    Likes Received:
    443
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @Michael-Inet

    Nothing needs-restarting so nothing is output is the way it's seen in this instance by most. I also want to point out that bin is just a symlink to /usr/bin the script has always lived in /usr/bin:

    Code:
    [root@server /]# stat bin
      File: ‘bin’ -> ‘usr/bin’
      Size: 7             Blocks: 0          IO Block: 4096   symbolic link
    Device: fd01h/64769d    Inode: 17          Links: 1
    Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
    Access: 2020-11-20 00:00:00.087999981 -0600
    Modify: 2018-07-06 18:26:04.655791203 -0500
    Change: 2018-07-06 18:26:04.655791203 -0500
     Birth: -
    If you have a concern with the script's function you'd need to contact the creators of the script. It's provided by the yum-utils package:

    Code:
    [root@server /]# repoquery -l yum-utils-1.1.31-46.el7_5.noarch |grep needs
    /usr/bin/needs-restarting
    /usr/share/man/man1/needs-restarting.1.gz
    The yum-utils package is provided by Updates:

    Code:
    um list yum-utils-1.1.31-46.el7_5.noarch
    Loaded plugins: fastestmirror, universal-hooks
    Loading mirror speeds from cached hostfile
     * EA4: 67.222.0.10
     * EA4-experimental: 67.222.0.10
     * cpanel-addons-production-feed: 67.222.0.10
     * base: repo1.dal.innoscale.net
     * epel: fedora-epel.mirror.lstn.net
     * extras: ftpmirror.your.org
     * updates: repo1.dal.innoscale.net
    Installed Packages
    yum-utils.noarch                                                                                                 1.1.31-46.el7_5                                                                                                  @updates
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    LucasRolff likes this.
  7. Michael-Inet

    Michael-Inet Well-Known Member

    Joined:
    Feb 20, 2014
    Messages:
    64
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    Austin, TX, USA
    cPanel Access Level:
    Root Administrator
    Hi Lauren, (@cPanelLauren)

    Ah, yeah, unfortunately this got sidetracked by non-cPanel scripts. My fault, copy/pasting too much, too quick from the other thread. Which I even forgot to link to here :( In Progress - [CPANEL-24261] find_outdated_services performs soft restarts

    I did get the title right ;0 (/scripts/find_outdated_services broken?) as that’s the cPanel script that was suppose to be under discussion here.

    After further discussion in the parent thread, cPanelMichael opened an internal case (CPANEL-24261) to address the root of the issue, which makes this child thread redundant.

    I’m good if you just want to delete this whole thread, as I don’t see that it’s currently useful to anyone, or adds any value on top of the original thread.

    If this thread can’t be deleted per policy or whatever, please add this to my OP (as I can no longer edit it).

    Thanks and Happy Holidays!

    Best,
    Michael
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice