/scripts/find_outdated_services broken?

ES - George

Well-Known Member
PartnerNOC
Jun 12, 2011
179
25
68
UK
cPanel Access Level
DataCenter Provider
Twitter
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:
[email protected] [~]# /usr/bin/needs-restarting
[email protected] [~]#
Best,
Michael
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
 

Michael-Inet

Well-Known Member
Feb 20, 2014
104
13
68
Austin, TX, USA
cPanel Access Level
Root Administrator
That is the desired output, as it means that nothing needs restarting. It will only populate if there's something that needs restarting
Ah, no. That’s the definition of a broken script.

Telling the user nothing is never a desired output. Think about it...
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
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:
[[email protected] /]# 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:
[[email protected] /]# 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
 
  • Like
Reactions: LucasRolff

Michael-Inet

Well-Known Member
Feb 20, 2014
104
13
68
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).

Edit: 2018-12-21 15:29

With the opening of internal case (CPANEL-24261) this thread has become redundant and serves no purpose. For additional details, please see the original/parent thread: In Progress - [CPANEL-24261] find_outdated_services performs soft restarts
Thanks and Happy Holidays!

Best,
Michael