Need to stop monitored services but they bounce back

simonb

Verified User
Joined
Feb 15, 2006
Messages
7
For something else I am working on, I need to change to a runlevel where jus about everything but sshd is stopped. However the monitoring on DA just bounces back the services just as soon as they are stopped.

Is there any way for a script to disable the DA's service monitor and re-enable it later?

I can't figure out what process to kill. I've tried all the likely candidates.

Stopping DA doesn't seem to stop the service monitor.
 
OK, after a bit of digging, I can reply to myself now.

The services monitor is a cron task called "dataskq" run every minute. It is set up by /etc/cron.d/directadmin_cron .

To shut down all services all I need to do is shut down crond first. Then it won't fight with me.
 
If you disable cron, you disable much more than service monitoring.
You could just edit the following file: /usr/local/directadmin/data/admin/services.status and restart directadmin for your changes to take effect.

More info can be found here: ability to add custom services to list
 
Yes I realise that disabling cron will disable many functions but in this particular case I actually want the machine to be put in a near-vegatative state.
 
Back
Top