Enable Linux Malware Detect (maldet) Monitoring at System Boot
Linux Malware Detect (maldet) doesn't register itself as a service. This is going to be a problem if you're using maldet monitoring mode. Because you'll have to manually start maldet each time your server reboots.
There is a inti script to register maldet as a service. But I never got it working. I gave up without troubleshooting it because I know a easy way to do it. We can simply run the maldet monitoring command at boot using /etc/rc.local file.
So to do this, we'll first create a file to include all the directories we want to monitor.
Paste paths to all the directories you want to monitor as a comma separated list in this file. Then open /etc/rc.local file with nano text editor,
Now paste following line just before that line that says exit 0,
maldet --monitor /usr/local/maldetect/monitor_paths
Save & close file. Linux Malware Detect (maldet) will now start at every reboot in monitoring mode and monitor the directories specified in monitor_paths file.