1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-06-12 23:57:29 +02:00
Mailu/optional/clamav/start.py
2023-04-13 14:46:12 +02:00

22 lines
512 B
Python
Executable File

#!/usr/bin/env python3
import os
import logging as logger
import sys
from socrate import system
system.set_env(log_filters=r'SelfCheck: Database status OK\.$')
# Bootstrap the database if clamav is running for the first time
if not os.path.isfile("/data/main.cvd"):
logger.info("Starting primary virus DB download")
os.system("freshclam")
# Run the update daemon
logger.info("Starting the update daemon")
os.system("freshclam -d -c 6")
# Run clamav
logger.info("Starting clamav")
os.system("clamd")