Introduce astcachedir, to be used for temporary bucket files

As described in the issue, /tmp is not a suitable location for a
large amount of cached media files, since most distributions make
/tmp a RAM-based tmpfs mount with limited capacity.

I opted for a location that can be configured separately, as opposed
to using a subdirectory of spooldir, given the different storage
profile (transient files vs files that might stay there indefinitely).

This commit just makes the cache directory configurable, and changes
the default location from /tmp to /var/cache/asterisk.

ASTERISK-29143

Change-Id: Ic54e95199405abacd9e509cef5f08fa14c510b5d
This commit is contained in:
lvl
2020-10-29 12:25:27 +01:00
committed by Friendly Automation
parent c8b6340023
commit b08427134f
14 changed files with 36 additions and 4 deletions

3
configure vendored
View File

@@ -1295,6 +1295,7 @@ BUILD_OS
BUILD_VENDOR
BUILD_CPU
BUILD_PLATFORM
astcachedir
astvarrundir
astlogdir
astspooldir
@@ -4660,6 +4661,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
# System default paths
astsbindir='${sbindir}'
astcachedir='${localstatedir}/cache/asterisk'
astetcdir='${sysconfdir}/asterisk'
astheaderdir='${includedir}/asterisk'
astlibdir='${libdir}'
@@ -4728,6 +4730,7 @@ $as_echo "#define _DARWIN_UNLIMITED_SELECT 1" >>confdefs.h
;;
solaris*)
if test ${prefix} = 'NONE'; then
astcachedir=/var/cache/asterisk
astetcdir=/var/etc/asterisk
astsbindir=/opt/asterisk/sbin
astlibdir=/opt/asterisk/lib