Fix freshclam execution.

This commit is contained in:
Antoine Nguyen
2016-06-01 19:17:56 +02:00
parent 89cdc314ea
commit 3d47829922

View File

@@ -67,10 +67,10 @@ WantedBy=multi-user.target
EOM EOM
""".format(path)) """.format(path))
if utils.dist_name() == "ubuntu": if utils.dist_name() in ["debian", "ubuntu"]:
# Stop freshclam daemon to allow manual download # Stop freshclam daemon to allow manual download
utils.exec_cmd("service clamav-freshclam stop") utils.exec_cmd("service clamav-freshclam stop")
utils.exec_cmd("freshclam", sudo_user=user) utils.exec_cmd("freshclam", sudo_user=user, login=False)
utils.exec_cmd("service clamav-freshclam start") utils.exec_cmd("service clamav-freshclam start")
else: else:
utils.exec_cmd("freshclam", sudo_user=user, login=False) utils.exec_cmd("freshclam", sudo_user=user, login=False)