{"id":432,"date":"2014-07-27T21:16:17","date_gmt":"2014-07-27T21:16:17","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=432"},"modified":"2014-07-27T21:16:17","modified_gmt":"2014-07-27T21:16:17","slug":"schedule-clamav-scanning-via-cron-with-zero-config-and-e-mail-notification","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2014\/07\/27\/schedule-clamav-scanning-via-cron-with-zero-config-and-e-mail-notification\/","title":{"rendered":"Schedule ClamAV scanning via Cron with zero config, and e-mail notification"},"content":{"rendered":"<p>Clamav-cron<br \/>\nSummary:<br \/>\nThis is a simple Bash script for those who want to schedule the following tasks via cron:<br \/>\nSource: <a href=\"https:\/\/code.google.com\/p\/clamav-cron\/\" target=\"_blank\" rel=\"noopener\">https:\/\/code.google.com\/p\/clamav-cron\/<\/a><\/p>\n<p>update the ClamAV virus database (freshclam);<br \/>\nperform personal system scan (clamscan);<br \/>\nsend a brief report via e-mail;<br \/>\nwithout any knowledge about ClamAV configuration files (such as clamd.conf or freshclam.conf) and without running the ClamAV daemon. You just have to configure the e-mail address(es) that will receive the report.<\/p>\n<p>Dependencies:<\/p>\n<p>To succesfilly run clamav-cron the following dependencies needs to be satisfied:<\/p>\n<p>the ClamAV engine (look at ClamAV download center);<br \/>\na mail server like Sendmail;<br \/>\nHow to use:<br \/>\nDownload clamav-cron somewhere like \/usr\/local\/bin\/ and give it execute permission:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\nwget http:\/\/clamav-cron.googlecode.com\/files\/clamav-cron-0.6 -O \/usr\/local\/bin\/clamav-cron\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\nchmod 755 \/usr\/local\/bin\/clamav-cron\n\n<\/pre>\n<p>Simply open the clamav-cron script with your editor and edit the &#8220;User configuration&#8221; section following the instructions;<br \/>\nschedule the clamav-cron script via Cron in the preferred way. For example, you can install the clamav-cron in the crontab typing crontab -e from the user shell and entering a line like this:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n45 23 * * 6 \/usr\/local\/bin\/clamav-cron \/home\n\n<\/pre>\n<p>Cron will run clamav-cron every Saturday at 23:45 (11:45 pm) to recursevly scan the whole \/home tree. At the end of task it will send a notification e-mail to the users specified at point 2. For more crontab option type man 5 crontab.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Clamav-cron Summary: This is a simple Bash script for those who want to schedule the following tasks via cron: Source: https:\/\/code.google.com\/p\/clamav-cron\/ update the ClamAV virus database (freshclam); perform personal system scan (clamscan); send a brief report via e-mail; without any knowledge about ClamAV configuration files (such as clamd.conf or freshclam.conf) and without running the ClamAV &#8230; <a title=\"Schedule ClamAV scanning via Cron with zero config, and e-mail notification\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2014\/07\/27\/schedule-clamav-scanning-via-cron-with-zero-config-and-e-mail-notification\/\" aria-label=\"Read more about Schedule ClamAV scanning via Cron with zero config, and e-mail notification\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-432","post","type-post","status-publish","format-standard","hentry","category-clamav"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=432"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/432\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}