Adding A Service To The Service Monitor

ZATZAi

Verified User
Joined
Dec 13, 2005
Messages
17
I recently installed Icecast2 onto my CentOS 4 rig (And let me tell ya it was a bitch, there were tons of missing dependencies). I found from searching the knowledge base a way to add icecast to the service monitor in Direct Admin.

You simple go to the "/usr/local/directadmin/data/admin/" directory and edit the "services.status" file, adding the a line for icecast or whatever the name of your service of choice is along the same lines as the others in the file (More Info).

However I have hit a snafu. Starting the icecast service requires a special command in SSH, basically you have to tell it to load your configuration file. Here's an example of the command I call in SSH to start up icecast.

Code:
icecast -b -c /etc/icecast.xml

So obviously if you try to start/restart icecast from DA it'll fail to execute. I was hoping there was some way to adjust how DA tries to start icecast, but I haven't been able to find any documentation to that effect.

Anyone know on this?
 
Yes I saw that, my understanding was that it was a simple Shell script that you run in Cron job in place of the DA service monitor (Back before we could add items to the service monitor). That it would check if a service is running and email you when it isn't.

Is it more than that? Will the DA service monitor actually use the commands from that shell script to start the service? I'll give it a try to see if it behaves that way, I didn't think it did.
 
Well I believe it matches the name in the rc.d folder with the rest of the scripts for starting and stopping programs.
 
Ah it did indeed work. With a properly configured shell script put into Init.d and registered with chkconfig the service now autostarts when my server does and I can toggle the service in my DA service monitor.

Excellent.
 
Back
Top