mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-30 07:41:39 +00:00 
			
		
		
		
	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, but leaves it at /tmp by default, to ensure backwards compatibility. A future commit that only targets master could change the default location to something more sensible such as /var/tmp/asterisk. At that point, the cachedir could be created and cleaned up during uninstall by the Makefile script. ASTERISK-29143 Change-Id: Ic54e95199405abacd9e509cef5f08fa14c510b5d
		
			
				
	
	
		
			31 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| cat << END
 | |
| /*
 | |
|  * defaults.h
 | |
|  * Automatically generated from build options,
 | |
|  * only used in main/asterisk.c
 | |
|  */
 | |
| #define DEFAULT_CONFIG_FILE "${INSTALL_PATH}${ASTCONFPATH}"
 | |
| 
 | |
| #define DEFAULT_CACHE_DIR  "${INSTALL_PATH}${ASTCACHEDIR}"
 | |
| #define DEFAULT_CONFIG_DIR "${INSTALL_PATH}${ASTETCDIR}"
 | |
| #define DEFAULT_MODULE_DIR "${INSTALL_PATH}${ASTMODDIR}"
 | |
| #define DEFAULT_AGI_DIR    "${INSTALL_PATH}${AGI_DIR}"
 | |
| #define DEFAULT_LOG_DIR    "${INSTALL_PATH}${ASTLOGDIR}"
 | |
| 
 | |
| #define DEFAULT_RUN_DIR    "${INSTALL_PATH}${ASTVARRUNDIR}"
 | |
| #define DEFAULT_SOCKET     "${INSTALL_PATH}${ASTVARRUNDIR}/asterisk.ctl"
 | |
| #define DEFAULT_PID        "${INSTALL_PATH}${ASTVARRUNDIR}/asterisk.pid"
 | |
| 
 | |
| #define DEFAULT_VAR_DIR    "${INSTALL_PATH}${ASTVARLIBDIR}"
 | |
| #define DEFAULT_DB         "${INSTALL_PATH}${ASTDBDIR}/astdb"
 | |
| 
 | |
| #define DEFAULT_DATA_DIR   "${INSTALL_PATH}${ASTDATADIR}"
 | |
| #define DEFAULT_KEY_DIR    "${INSTALL_PATH}${ASTDATADIR}/keys"
 | |
| 
 | |
| #define DEFAULT_SPOOL_DIR  "${INSTALL_PATH}${ASTSPOOLDIR}"
 | |
| #define DEFAULT_TMP_DIR    "${INSTALL_PATH}${ASTSPOOLDIR}/tmp"
 | |
| 
 | |
| #define DEFAULT_SBIN_DIR   "${INSTALL_PATH}${ASTSBINDIR}"
 | |
| END
 |