Where are the settings for the service manager confirguation stored?

BianchiDude

Well-Known Member
PartnerNOC
Jul 2, 2005
619
0
166
Where are the settings for the service manager confirguation stored?

If I want to change those by edtting the file, rather than in WHM.

TIA
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
They are located in /var/cpanel/cpanel.config file and you would need to issue the following command after editing the file:

Code:
/usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings
 

BianchiDude

Well-Known Member
PartnerNOC
Jul 2, 2005
619
0
166
I'm not seeing the settings I'm looking for in there, is that file used for both tweak settings and the service manager?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Ah, sorry, I picked the wrong file. For some reason I thought you'd asked about WHM's Tweak Settings.

Service Manager uses /etc/chkserv.d/chkservd.conf file for the services to load and requires individual entries in /etc/chkserv.d folder for the service. An example one would be the sshd file at /etc/chkserv.d/sshd location:

Code:
[email protected] [/etc/chkserv.d]# cat sshd 
service[sshd]=x,x,x,/usr/local/cpanel/scripts/restartsrv_sshd,sshd,root
 

BianchiDude

Well-Known Member
PartnerNOC
Jul 2, 2005
619
0
166
Thanks!

So edit that file then restart the individual service or cpanel, or both?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello :)

This file is stored at:

Code:
/etc/chkserv.d/exim-#
You would replace "#" with the number of the port. Let's say you wanted to create the service for Exim on port 26 through the command line. You would follow the steps that Tristan mentioned in:

Monitoring Service Chkservd

You would of course change the name of the file and the content of the file. The name of the file would be "exim-#". The content of "/etc/chkserv.d/exim-#" would be:

Code:
service[exim-#]=#,QUIT,220,/usr/local/cpanel/scripts/restartsrv_exim
Again, replacing "#" with the number of the port.

Thank you.