Changed start.sh to start.py
This commit is contained in:
@@ -3,9 +3,9 @@ FROM alpine:3.8
|
||||
RUN apk add --no-cache clamav rsyslog wget clamav-libunrar
|
||||
|
||||
COPY conf /etc/clamav
|
||||
COPY start.sh /start.sh
|
||||
COPY start.py /start.py
|
||||
|
||||
EXPOSE 3310/tcp
|
||||
VOLUME ["/data"]
|
||||
|
||||
CMD ["/start.sh"]
|
||||
CMD /start.py
|
||||
|
||||
12
optional/clamav/start.py
Executable file
12
optional/clamav/start.py
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
|
||||
# Bootstrap the database if clamav is running for the first time
|
||||
os.system("[ -f /data/main.cvd ] || freshclam")
|
||||
|
||||
# Run the update daemon
|
||||
os.system("freshclam -d -c 6")
|
||||
|
||||
# Run clamav
|
||||
os.system("clamd")
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Bootstrap the database if clamav is running for the first time
|
||||
[ -f /data/main.cvd ] || freshclam
|
||||
|
||||
# Run the update daemon
|
||||
freshclam -d -c 6
|
||||
|
||||
# Run clamav
|
||||
clamd
|
||||
Reference in New Issue
Block a user