In this file, as far as I understand, the services are listed:
vim /usr/local/hestia/bin/v-list-sys-services
And here is the section that detects the antivirus service:
# Checking MAIL ANTIVIRUS
if [ -n "$ANTIVIRUS_SYSTEM" ] && [ "$ANTIVIRUS_SYSTEM" != 'remote' ]; then
if [ -d "/etc/sysconfig" ]; then
if [ "$ANTIVIRUS_SYSTEM" == 'clamav' ]; then
ANTIVIRUS_SYSTEM='clamd'
fi
get_srv_state "$ANTIVIRUS_SYSTEM"
else
if [ "$ANTIVIRUS_SYSTEM" == 'clamav-daemon' ]; then
proc_name='clamd'
fi
get_srv_state "$ANTIVIRUS_SYSTEM" "$proc_name"
fi
data="$data\nNAME='$ANTIVIRUS_SYSTEM' SYSTEM='email anti-virus'"
data="$data STATE='$state' CPU='$cpu' MEM='$mem' RTIME='$rtime'"
proc_name=''
fi
In another file, I have the service declaration:
vim /usr/local/hestia/conf/hestia.conf
There it’s set as:
ANTIVIRUS_SYSTEM='clamav-daemon'
Even if I change the first script to use ANTIVIRUS_SYSTEM='clamav-daemon', it still doesn’t work.
I just want it to show as running in the panel. Does anyone have any idea? I installed all components with the default setup.
Hestia thinks you’re using a RedHat-based OS because the /etc/sysconfig directory exists.
The correct solution is to rename the /etc/sysconfig directory, as it doesn’t exist by default on Debian or Ubuntu systems. Alternatively, you could modify the Hestia script but keep in mind that your changes will be overwritten during the next update.
sed -i -E 's|/etc/sysconfig|/etc/ZsysconfigZ|' /usr/local/hestia/bin/v-list-sys-services
v-list-sys-services | grep clamav
Thank you very much, Sahsanu. Your solution worked perfectly.
I guess I was just unlucky lol; that folder was created as part of a service on my VPS lol.
I’ll put the code you sent me into a service I have here that runs every night—so if I update Hestia overnight, it’ll fix itself lol.
Thanks again! I’ll link your answer as the solution in a thread I created earlier. Thanks again for your help.