I am pretty sure time to time, admins may need to install some component after installing HCP. But there is no document or option in hestia. It would be nice to have at least some documentation.
I need to install Clamav. Is this part taken from installer ok to apply. Or any stable way to install it? Because there are some variable below that I can not know.
if [ "$clamd" = 'yes' ]; then
gpasswd -a clamav mail > /dev/null 2>&1
gpasswd -a clamav Debian-exim > /dev/null 2>&1
cp -f $HESTIA_INSTALL_DIR/clamav/clamd.conf /etc/clamav/
update-rc.d clamav-daemon defaults
if [ ! -d "/var/run/clamav" ]; then
mkdir /var/run/clamav
fi
chown -R clamav:clamav /var/run/clamav
if [ -e "/lib/systemd/system/clamav-daemon.service" ]; then
exec_pre1='ExecStartPre=-/bin/mkdir -p /var/run/clamav'
exec_pre2='ExecStartPre=-/bin/chown -R clamav:clamav /var/run/clamav'
sed -i "s|\[Service\]/|[Service]\n$exec_pre1\n$exec_pre2|g" \
/lib/systemd/system/clamav-daemon.service
systemctl daemon-reload
fi
echo -ne "[ * ] Installing ClamAV anti-virus definitions... "
/usr/bin/freshclam >> $LOG &
BACK_PID=$!
spin_i=1
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
printf "\b${spinner:spin_i++%${#spinner}:1}"
sleep 0.5
done
echo
systemctl start clamav-daemon
check_result $? "clamav-daemon start failed"
fi