Initial Release

This commit is contained in:
Deon George
2017-06-02 23:48:48 +10:00
commit 74ef5e19b8
4 changed files with 317 additions and 0 deletions

21
init Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -e
NAME="CLAMAV"
function stop {
echo "Stopping ${NAME}"
kill $(cat /var/run/clamd.pid)
kill $(cat /var/run/clamav-milter.pid)
}
trap 'stop' SIGTERM
if [ "$1" == "start" ]; then
[ -x /usr/sbin/clamd -a -x /usr/bin/freshclam ] && /usr/bin/freshclam --config-file=/etc/clamav/freshclam.conf && /usr/sbin/clamd -c /etc/clamav/clamd.conf
[ -x /usr/sbin/clamav-milter ] && /usr/sbin/clamav-milter -c /etc/clamav/clamav-milter.conf &
wait
else
exec $@
fi