Quantcast
Channel: cPanel Forums
Viewing all articles
Browse latest Browse all 5759

Custom Service in Service Manager

$
0
0
Good afternoon,

I'm looking to add a new service to WHM's Service Manager. I've dug through the forums and found some helpful posts, namely:

* http://forums.cpanel.net/f5/how-add-...ch-128829.html
(But the PDF doesn't exist, but I found it here: http://web.archive.org/web/201205181...leshooting.pdf)

* http://forums.cpanel.net/f5/how-add-...tor-17721.html

I've added a file to the directory as instructed "/etc/chkserv.d" named cwirkinit with the following contents:

Code:

service[cwirkinit]=x,x,x,/root/cwirk/cwirkinit,cwirkinit,root


It looks like everything is working except for two things:

1. If I go to WHM > Service Configuration > Service Manager, I see cwirkinit under Additional Services (yay!) but when I hit Save, I get the following:
This looks good...
Quote:

Saving Changes to cwirkinit (enabled) using custom (/etc/chkserv.d/cwirkinit) driver......Done
This does not...
Quote:

The “cwirkinit” service is not a known service.
at /usr/local/cpanel/Cpanel/Exception.pm line 102.
Cpanel::Exception::new("Cpanel::Exception::Services::Unknown", HASH(0x9bf62c0)) called at /usr/local/cpanel/Cpanel/Exception.pm line 53
Cpanel::Exception::create("Services::Unknown", HASH(0x9bf62c0)) called at /usr/local/cpanel/scripts/restartsrv line 404
Scripts::restartsrv::_lookup_service_restart_info(Scripts::restartsrv=HASH(0x9bf05d4), "cwirkinit") called at /usr/local/cpanel/scripts/restartsrv line 42
Scripts::restartsrv::script("Scripts::restartsrv", "--wait", "cwirkinit") called at /usr/local/cpanel/scripts/restartsrv line 21

2. If I kill off the process, the service never gets restarted.

// edit - added this
I've also just noticed under Server Status > Service Status that I have cwirkinit showing up there (pretty cool - didn't expect it there, but I'll gladly take it) but it shows as running, even though I know it really isn't. I've even checked ps -A and confirmed that the process really isn't there.
// end edit

I'm assuming I've done something wrong here, but just not sure what. Any thoughts?

Thank you,
~ Kyle

Viewing all articles
Browse latest Browse all 5759

Trending Articles