Initial Release
This commit is contained in:
21
init
Executable file
21
init
Executable 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
|
Reference in New Issue
Block a user