1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-25 07:47:05 +00:00

add configurable backup dir to status checks

This commit is contained in:
KiekerJan 2022-06-13 20:25:48 +02:00
parent 69e15fa942
commit 727d84004f

View File

@ -20,6 +20,7 @@ from ssl_certificates import get_ssl_certificates, get_domain_ssl_files, check_c
from mailconfig import get_mail_domains, get_mail_aliases from mailconfig import get_mail_domains, get_mail_aliases
from utils import shell, sort_domains, load_env_vars_from_file, load_settings from utils import shell, sort_domains, load_env_vars_from_file, load_settings
from backup import get_backup_root
def get_services(): def get_services():
return [ return [
@ -261,7 +262,7 @@ def check_free_disk_space(rounded_values, env, output):
# Check that there's only one duplicity cache. If there's more than one, # Check that there's only one duplicity cache. If there's more than one,
# it's probably no longer in use, and we can recommend clearing the cache # it's probably no longer in use, and we can recommend clearing the cache
# to save space. The cache directory may not exist yet, which is OK. # to save space. The cache directory may not exist yet, which is OK.
backup_cache_path = os.path.join(env['STORAGE_ROOT'], 'backup/cache') backup_cache_path = os.path.join(get_backup_root(env), 'cache')
try: try:
backup_cache_count = len(os.listdir(backup_cache_path)) backup_cache_count = len(os.listdir(backup_cache_path))
except: except: