1
0
Fork 0
mirror of synced 2024-06-29 03:30:34 +12:00

[BUG] Doctor fails check when ClamAV is disabled and not running

Fixes #430
This commit is contained in:
Eldad Fux 2020-06-20 01:32:32 +03:00
parent ef270af86e
commit 845b9198b5
2 changed files with 19 additions and 15 deletions

View file

@ -133,15 +133,18 @@ $cli
}
if($request->getServer('_APP_STORAGE_ANTIVIRUS') === 'enabled') { // Check if scans are enabled
$antiVirus = new Network('clamav', 3310);
try {
$antiVirus = new Network('clamav', 3310);
if((@$antiVirus->ping())) {
Console::success('AntiVirus...........connected 👍');
}
else {
if((@$antiVirus->ping())) {
Console::success('AntiVirus...........connected 👍');
}
else {
Console::error('AntiVirus........disconnected 👎');
}
} catch (\Throwable $th) {
Console::error('AntiVirus........disconnected 👎');
}
}
try {

View file

@ -59,7 +59,7 @@ services:
- mariadb
- redis
# - smtp
- clamav
# - clamav
- influxdb
- telegraf
- maildev
@ -71,6 +71,7 @@ services:
- _APP_OPENSSL_KEY_V1=your-secret-key
- _APP_DOMAIN=demo.appwrite.io
- _APP_DOMAIN_TARGET=demo.appwrite.io
# - _APP_STORAGE_ANTIVIRUS=disabled
- _APP_REDIS_HOST=redis
- _APP_REDIS_PORT=6379
- _APP_DB_HOST=mariadb
@ -130,14 +131,14 @@ services:
volumes:
- appwrite-redis:/data:rw
clamav:
image: appwrite/clamav:1.0.9
container_name: appwrite_clamav
restart: unless-stopped
networks:
- appwrite
volumes:
- appwrite-uploads:/storage/uploads
# clamav:
# image: appwrite/clamav:1.0.9
# container_name: appwrite_clamav
# restart: unless-stopped
# networks:
# - appwrite
# volumes:
# - appwrite-uploads:/storage/uploads
influxdb:
image: influxdb:1.6