Solved How to disable LFD in DA service monitor

AhmetBas

Verified User
Joined
Oct 28, 2020
Messages
48
Hello,

We are using CSF/LFD by default, on some servers we are also using Imunify360. When Imunify360 is used we disable the LFD feature otherwise it's causing false positives. What we do:

1. Change "LF_DAEMON" to "0"
2. Disable LFD in DirectAdmin configuration
Code:
sed -i '/^lfd=/d' /usr/local/directadmin/data/admin/services.status
3. Restart DirectAdmin

After DA updates we see the following message "The service 'lfd' on server vps.webmarq.nl is currently down" sent by DA. When I check I can see that DA config has "LFD=on" again in the services.status.

What should be the proper way to disable LFD and survive the DA updates?
 
only change LF_DAEMON=OFF|0 not enought ?
service lfd restart

what's other service cause blocking while turnoff "LF_DAEMON" ?
 
only change LF_DAEMON=OFF|0 not enought ?
service lfd restart

what's other service cause blocking while turnoff "LF_DAEMON" ?
No this is not enough, since DA detects that LFD is turned off and keeps sending notifications.
 
ok I see that.
Trying set "lfd=OFF" in "/usr/local/directadmin/data/admin/services.status"

main problem, you shouldn't deleted line "lfd=" in "services.status" you should set to OFF or turnoff from service monitor in DA GUI.

when updated, DA script will detect if any lines missing some service. it will re-added to "services.status", but if you set to "OFF" it will permanantly OFF/Disable that service from Monitor System.
 
ok I see that.
Trying set "lfd=OFF" in "/usr/local/directadmin/data/admin/services.status"

main problem, you shouldn't deleted line "lfd=" in "services.status" you should set to OFF or turnoff from service monitor in DA GUI.

when updated, DA script will detect if any lines missing some service. it will re-added to "services.status", but if you set to "OFF" it will permanantly OFF/Disable that service from Monitor System.
Is there a method that allows to remove a service and survive an update? The problem with "Off" is that administrators can start the service which you want to prevent.
 
trying mask the service. this can prevent from manual start lfd. Combined with lfd=OFF

warn: turnoff LFD from service monitor before do this.
Code:
systemctl disable lfd
systemctl mask --now lfd

then try starting LFD from service monitor. and see "lfd=OFF" with shouldn't changing to "ON" due fail start service ( this logic should be like this ).


this can't removed from "services.status" cause it detect and check from DA update script. it only chsnge between ON or "OFF"
 
trying mask the service. this can prevent from manual start lfd. Combined with lfd=OFF

warn: turnoff LFD from service monitor before do this.
Code:
systemctl disable lfd
systemctl mask --now lfd

then try starting LFD from service monitor. and see "lfd=OFF" with shouldn't changing to "ON" due fail start service ( this logic should be like this ).


this can't removed from "services.status" cause it detect and check from DA update script. it only chsnge between ON or "OFF"
Thanks for the assistance, let's see if this helps :)
 
Back
Top