forked from Mirrors/freeswitch
FS-7507: Add global vars fonts_dir, images_dir, data_dir, localstate_dir
change configure detection to do FHS layout if you specify a prefix, unless --disable-fhs is passed to configure moved includes to be under /usr/include/freeswitch dir in fhs layout install font files into fonts_dir
This commit is contained in:
parent
d0bd11f7bc
commit
857a61318e
|
@ -552,6 +552,8 @@ samples-htdocs:
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
fonts_DATA = fonts/FreeMono.ttf fonts/FreeMonoOblique.ttf fonts/FreeSansBoldOblique.ttf fonts/FreeSerifBold.ttf fonts/OFL.txt fonts/FreeMonoBold.ttf fonts/FreeSans.ttf fonts/FreeSansOblique.ttf fonts/FreeSerifBoldItalic.ttf fonts/README.fonts fonts/FreeMonoBoldOblique.ttf fonts/FreeSansBold.ttf fonts/FreeSerif.ttf fonts/FreeSerifItalic.ttf
|
||||||
|
|
||||||
samples: samples-conf samples-htdocs
|
samples: samples-conf samples-htdocs
|
||||||
|
|
||||||
install-exec-local:
|
install-exec-local:
|
||||||
|
@ -559,7 +561,7 @@ install-exec-local:
|
||||||
|
|
||||||
install-data-local:
|
install-data-local:
|
||||||
@echo Installing $(NAME)
|
@echo Installing $(NAME)
|
||||||
@for x in $(modulesdir) $(runtimedir) $(dbdir) $(logfiledir) $(logfiledir)/xml_cdr $(bindir) $(scriptdir) $(recordingsdir) $(grammardir); do \
|
@for x in $(modulesdir) $(runtimedir) $(dbdir) $(logfiledir) $(logfiledir)/xml_cdr $(bindir) $(scriptdir) $(recordingsdir) $(grammardir) $(imagesdir) $(fontsdir); do \
|
||||||
$(mkinstalldirs) $(DESTDIR)$$x ; \
|
$(mkinstalldirs) $(DESTDIR)$$x ; \
|
||||||
done
|
done
|
||||||
test -d $(DESTDIR)$(sysconfdir) || $(MAKE) samples-conf
|
test -d $(DESTDIR)$(sysconfdir) || $(MAKE) samples-conf
|
||||||
|
|
129
configure.ac
129
configure.ac
|
@ -20,12 +20,6 @@ AC_CONFIG_HEADER([src/include/switch_private.h])
|
||||||
AC_CONFIG_HEADER([libs/esl/src/include/esl_config_auto.h])
|
AC_CONFIG_HEADER([libs/esl/src/include/esl_config_auto.h])
|
||||||
AC_CONFIG_HEADER([libs/xmlrpc-c/xmlrpc_amconfig.h])
|
AC_CONFIG_HEADER([libs/xmlrpc-c/xmlrpc_amconfig.h])
|
||||||
|
|
||||||
AC_PREFIX_DEFAULT(/usr/local/freeswitch)
|
|
||||||
# AC_PREFIX_DEFAULT does not get expanded until too late so we need to do this to use prefix in this script
|
|
||||||
if test "x$prefix" = "xNONE" ; then
|
|
||||||
prefix='/usr/local/freeswitch'
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
# Absolute source/build directory
|
# Absolute source/build directory
|
||||||
|
@ -58,54 +52,69 @@ if test "${enable_64}" = "yes"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Whether to follow FHS
|
# Whether to follow FHS
|
||||||
AC_ARG_ENABLE([fhs],
|
AC_ARG_ENABLE([fhs],[AS_HELP_STRING([--disable-fhs],
|
||||||
[AS_HELP_STRING([--enable-fhs],
|
[Do Not follow the FHS when placing files and directories (default only when not specifying prefix])],[enable_fhs="$enableval"],[enable_fhs="yes"])
|
||||||
[Follow the FHS when placing files and directories])],,
|
|
||||||
[enable_fhs="no"])
|
|
||||||
AM_CONDITIONAL([ENABLE_FHS],[test "${enable_fhs}" = "yes"])
|
|
||||||
|
|
||||||
if test "$localstatedir" = "\${prefix}/var" ; then
|
AC_PREFIX_DEFAULT(/usr/local/freeswitch)
|
||||||
rundir="$prefix/run"
|
# AC_PREFIX_DEFAULT does not get expanded until too late so we need to do this to use prefix in this script
|
||||||
logdir="${prefix}/log"
|
|
||||||
else
|
if test "x$prefix" = "xNONE" ; then
|
||||||
rundir="$localstatedir/run/freeswitch"
|
enable_fhs=no
|
||||||
logdir="$localstatedir/log/freeswitch"
|
prefix='/usr/local/freeswitch'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
default_certsdir="$prefix/certs"
|
|
||||||
default_dbdir="$prefix/db"
|
|
||||||
default_grammardir="$prefix/grammar"
|
|
||||||
default_htdocsdir="$prefix/htdocs"
|
|
||||||
default_logfiledir="$logdir"
|
|
||||||
default_modulesdir="$prefix/mod"
|
|
||||||
default_pkgconfigdir="$libdir/pkgconfig"
|
|
||||||
default_recordingsdir="$prefix/recordings"
|
|
||||||
default_runtimedir="$rundir"
|
|
||||||
default_scriptdir="$prefix/scripts"
|
default_scriptdir="$prefix/scripts"
|
||||||
|
default_grammardir="$prefix/grammar"
|
||||||
default_soundsdir="$prefix/sounds"
|
default_soundsdir="$prefix/sounds"
|
||||||
|
default_htdocsdir="$prefix/htdocs"
|
||||||
|
default_modulesdir="$prefix/mod"
|
||||||
|
default_dbdir="$prefix/db"
|
||||||
default_storagedir="$prefix/storage"
|
default_storagedir="$prefix/storage"
|
||||||
default_cachedir="$prefix/cache"
|
default_cachedir="$prefix/cache"
|
||||||
|
default_recordingsdir="$prefix/recordings"
|
||||||
|
rundir="$prefix/run"
|
||||||
|
logdir="${prefix}/log"
|
||||||
|
confdir="$prefix/conf"
|
||||||
|
default_certsdir="$prefix/certs"
|
||||||
|
default_fontsdir="$prefix/fonts"
|
||||||
|
default_imagesdir="$prefix/images"
|
||||||
|
|
||||||
if test "$enable_fhs" = yes; then
|
if test "${enable_fhs}" = "yes"; then
|
||||||
prefix="/usr" exec_prefix="$prefix"
|
eval full_datadir="${datadir}/freeswitch"
|
||||||
libdir="$(eval echo "$libdir")"
|
eval datadir=$full_datadir
|
||||||
sysconfdir="/etc/freeswitch"
|
default_cachedir="$localstatedir/cache/freeswitch"
|
||||||
localstatedir="/var"
|
localstatedir="${localstatedir}/lib/freeswitch"
|
||||||
default_certsdir="/etc/freeswitch/tls"
|
default_scriptdir="${datadir}/scripts"
|
||||||
default_dbdir="/var/lib/freeswitch/db"
|
default_grammardir="${datadir}/grammar"
|
||||||
default_grammardir="/usr/share/freeswitch/grammar"
|
default_soundsdir="${datadir}/sounds"
|
||||||
default_htdocsdir="/usr/share/freeswitch/htdocs"
|
default_htdocsdir="${datadir}/htdocs"
|
||||||
default_logfiledir="/var/log/freeswitch"
|
default_fontsdir="${datadir}/fonts"
|
||||||
default_modulesdir="$libdir/freeswitch/mod"
|
default_modulesdir="$libdir/freeswitch/mod"
|
||||||
default_pkgconfigdir="$libdir/pkgconfig"
|
default_dbdir="$localstatedir/db"
|
||||||
default_recordingsdir="/var/lib/freeswitch/recordings"
|
default_storagedir="$localstatedir/storage"
|
||||||
default_runtimedir="/var/run/freeswitch"
|
default_recordingsdir="$localstatedir/recordings"
|
||||||
default_scriptdir="/usr/share/freeswitch/scripts"
|
default_imagesdir="$localstatedir/images"
|
||||||
default_soundsdir="/usr/share/freeswitch/sounds"
|
rundir="$localstatedir/run/freeswitch"
|
||||||
default_storagedir="/var/lib/freeswitch/storage"
|
logdir="$localstatedir/log/freeswitch"
|
||||||
default_cachedir="/var/cache/freeswitch"
|
confdir="$sysconfdir/freeswitch"
|
||||||
|
default_certsdir="$confdir/tls"
|
||||||
|
else
|
||||||
|
if test "$datadir" = "\${datarootdir}" ; then
|
||||||
|
datadir="${prefix}"
|
||||||
|
fi
|
||||||
|
if test "$localstatedir" = "\${prefix}/var" ; then
|
||||||
|
localstatedir="${prefix}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$includedir" = "\${prefix}/include" ; then
|
||||||
|
includedir="${prefix}/include/freeswitch"
|
||||||
|
fi
|
||||||
|
|
||||||
|
default_pkgconfigdir="$libdir/pkgconfig"
|
||||||
|
default_runtimedir="$rundir"
|
||||||
|
default_logfiledir="$logdir"
|
||||||
|
|
||||||
# Where to install the modules
|
# Where to install the modules
|
||||||
AC_ARG_WITH([modinstdir],
|
AC_ARG_WITH([modinstdir],
|
||||||
[AS_HELP_STRING([--with-modinstdir=DIR], [Install modules into this location (default: $prefix/mod)])], [modulesdir="$withval"], [modulesdir="${default_modulesdir}"])
|
[AS_HELP_STRING([--with-modinstdir=DIR], [Install modules into this location (default: $prefix/mod)])], [modulesdir="$withval"], [modulesdir="${default_modulesdir}"])
|
||||||
|
@ -133,6 +142,11 @@ AC_ARG_WITH([htdocsdir],
|
||||||
AC_SUBST(htdocsdir)
|
AC_SUBST(htdocsdir)
|
||||||
AC_DEFINE_UNQUOTED([SWITCH_HTDOCS_DIR],"${htdocsdir}",[where to put htdocs files])
|
AC_DEFINE_UNQUOTED([SWITCH_HTDOCS_DIR],"${htdocsdir}",[where to put htdocs files])
|
||||||
|
|
||||||
|
AC_ARG_WITH([fontsdir],
|
||||||
|
[AS_HELP_STRING([--with-fontsdir=DIR], [Put font files into this location (default: $prefix/fonts)])], [fontsdir="$withval"], [fontsdir="${default_fontsdir}"])
|
||||||
|
AC_SUBST(fontsdir)
|
||||||
|
AC_DEFINE_UNQUOTED([SWITCH_FONTS_DIR],"${fontsdir}",[where to put font files])
|
||||||
|
|
||||||
AC_ARG_WITH([soundsdir],
|
AC_ARG_WITH([soundsdir],
|
||||||
[AS_HELP_STRING([--with-soundsdir=DIR], [Put sound files into this location (default: $prefix/sounds)])], [soundsdir="$withval"], [soundsdir="${default_soundsdir}"])
|
[AS_HELP_STRING([--with-soundsdir=DIR], [Put sound files into this location (default: $prefix/sounds)])], [soundsdir="$withval"], [soundsdir="${default_soundsdir}"])
|
||||||
AC_SUBST(soundsdir)
|
AC_SUBST(soundsdir)
|
||||||
|
@ -158,6 +172,11 @@ AC_ARG_WITH([recordingsdir],
|
||||||
AC_SUBST(recordingsdir)
|
AC_SUBST(recordingsdir)
|
||||||
AC_DEFINE_UNQUOTED([SWITCH_RECORDINGS_DIR],"${recordingsdir}",[where to put recording files])
|
AC_DEFINE_UNQUOTED([SWITCH_RECORDINGS_DIR],"${recordingsdir}",[where to put recording files])
|
||||||
|
|
||||||
|
AC_ARG_WITH([imagesdir],
|
||||||
|
[AS_HELP_STRING([--with-imagesdir=DIR], [Put images files into this location (default: $prefix/images)])], [imagesdir="$withval"], [imagesdir="${default_imagesdir}"])
|
||||||
|
AC_SUBST(imagesdir)
|
||||||
|
AC_DEFINE_UNQUOTED([SWITCH_IMAGES_DIR],"${imagesdir}",[where to put image files])
|
||||||
|
|
||||||
AC_ARG_WITH([storagedir],
|
AC_ARG_WITH([storagedir],
|
||||||
[AS_HELP_STRING([--with-storagedir=DIR], [Put storage files into this location (default: $prefix/storage)])], [storagedir="$withval"], [storagedir="${default_storagedir}"])
|
[AS_HELP_STRING([--with-storagedir=DIR], [Put storage files into this location (default: $prefix/storage)])], [storagedir="$withval"], [storagedir="${default_storagedir}"])
|
||||||
AC_SUBST(storagedir)
|
AC_SUBST(storagedir)
|
||||||
|
@ -168,17 +187,15 @@ AC_ARG_WITH([cachedir],
|
||||||
AC_SUBST(cachedir)
|
AC_SUBST(cachedir)
|
||||||
AC_DEFINE_UNQUOTED([SWITCH_CACHE_DIR],"${cachedir}",[where to put cache files])
|
AC_DEFINE_UNQUOTED([SWITCH_CACHE_DIR],"${cachedir}",[where to put cache files])
|
||||||
|
|
||||||
if test "$sysconfdir" = "\${prefix}/etc" ; then
|
|
||||||
confdir="$prefix/conf"
|
|
||||||
else
|
|
||||||
confdir="$sysconfdir"
|
|
||||||
fi
|
|
||||||
|
|
||||||
sysconfdir="$confdir"
|
|
||||||
|
|
||||||
AC_SUBST(confdir)
|
AC_SUBST(confdir)
|
||||||
AC_DEFINE_UNQUOTED([SWITCH_CONF_DIR],"${confdir}",[directory for configuration files])
|
AC_DEFINE_UNQUOTED([SWITCH_CONF_DIR],"${confdir}",[directory for configuration files])
|
||||||
|
|
||||||
|
AC_SUBST(datadir)
|
||||||
|
AC_DEFINE_UNQUOTED([SWITCH_DATA_DIR],"${datadir}",[directory for data files])
|
||||||
|
|
||||||
|
AC_SUBST(localstatedir)
|
||||||
|
AC_DEFINE_UNQUOTED([SWITCH_LOCALSTATE_DIR],"${localstatedir}",[directory for local state files])
|
||||||
|
|
||||||
AC_SUBST(libdir)
|
AC_SUBST(libdir)
|
||||||
AC_SUBST(bindir)
|
AC_SUBST(bindir)
|
||||||
AC_SUBST(includedir)
|
AC_SUBST(includedir)
|
||||||
|
@ -1800,7 +1817,7 @@ AC_OUTPUT
|
||||||
##
|
##
|
||||||
## Registering for ClueCon
|
## Registering for ClueCon
|
||||||
##
|
##
|
||||||
if ! test -f noreg ; then
|
if ! test -f noreg -o -f /noreg; then
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo $ECHO_N "Registering you for ClueCon http://www.cluecon.com $ECHO_C" 1>&6
|
echo $ECHO_N "Registering you for ClueCon http://www.cluecon.com $ECHO_C" 1>&6
|
||||||
|
@ -1821,22 +1838,26 @@ echo
|
||||||
echo "-------------------------- FreeSWITCH configuration --------------------------"
|
echo "-------------------------- FreeSWITCH configuration --------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
echo " Locations:"
|
echo " Locations:"
|
||||||
echo " FHS enabled: ${enable_fhs}"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo " prefix: ${prefix}"
|
echo " prefix: ${prefix}"
|
||||||
echo " exec_prefix: ${exec_prefix}"
|
echo " exec_prefix: ${exec_prefix}"
|
||||||
echo " bindir: ${bindir}"
|
echo " bindir: ${bindir}"
|
||||||
echo " sysconfdir: ${sysconfdir}"
|
echo " confdir: ${confdir}"
|
||||||
echo " libdir: ${libdir}"
|
echo " libdir: ${libdir}"
|
||||||
|
echo " datadir: ${datadir}"
|
||||||
|
echo " localstatedir: ${localstatedir}"
|
||||||
|
echo " includedir: ${includedir}"
|
||||||
echo ""
|
echo ""
|
||||||
echo " certsdir: ${certsdir}"
|
echo " certsdir: ${certsdir}"
|
||||||
echo " dbdir: ${dbdir}"
|
echo " dbdir: ${dbdir}"
|
||||||
echo " grammardir: ${grammardir}"
|
echo " grammardir: ${grammardir}"
|
||||||
echo " htdocsdir: ${htdocsdir}"
|
echo " htdocsdir: ${htdocsdir}"
|
||||||
|
echo " fontsdir: ${fontsdir}"
|
||||||
echo " logfiledir: ${logfiledir}"
|
echo " logfiledir: ${logfiledir}"
|
||||||
echo " modulesdir: ${modulesdir}"
|
echo " modulesdir: ${modulesdir}"
|
||||||
echo " pkgconfigdir: ${pkgconfigdir}"
|
echo " pkgconfigdir: ${pkgconfigdir}"
|
||||||
echo " recordingsdir: ${recordingsdir}"
|
echo " recordingsdir: ${recordingsdir}"
|
||||||
|
echo " imagesdir: ${imagesdir}"
|
||||||
echo " runtimedir: ${runtimedir}"
|
echo " runtimedir: ${runtimedir}"
|
||||||
echo " scriptdir: ${scriptdir}"
|
echo " scriptdir: ${scriptdir}"
|
||||||
echo " soundsdir: ${soundsdir}"
|
echo " soundsdir: ${soundsdir}"
|
||||||
|
|
|
@ -526,6 +526,10 @@ struct switch_directories {
|
||||||
char *sounds_dir;
|
char *sounds_dir;
|
||||||
char *lib_dir;
|
char *lib_dir;
|
||||||
char *certs_dir;
|
char *certs_dir;
|
||||||
|
char *fonts_dir;
|
||||||
|
char *images_dir;
|
||||||
|
char *data_dir;
|
||||||
|
char *localstate_dir;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct switch_directories switch_directories;
|
typedef struct switch_directories switch_directories;
|
||||||
|
|
|
@ -785,6 +785,50 @@ SWITCH_DECLARE(void) switch_core_set_globals(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!SWITCH_GLOBAL_dirs.fonts_dir && (SWITCH_GLOBAL_dirs.fonts_dir = (char *) malloc(BUFSIZE))) {
|
||||||
|
if (SWITCH_GLOBAL_dirs.base_dir)
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.fonts_dir, BUFSIZE, "%s%sfonts", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR);
|
||||||
|
else
|
||||||
|
#ifdef SWITCH_FONT_DIR
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.fonts_dir, BUFSIZE, "%s", SWITCH_FONT_DIR);
|
||||||
|
#else
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.fonts_dir, BUFSIZE, "%s%sfonts", base_dir, SWITCH_PATH_SEPARATOR);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SWITCH_GLOBAL_dirs.images_dir && (SWITCH_GLOBAL_dirs.images_dir = (char *) malloc(BUFSIZE))) {
|
||||||
|
if (SWITCH_GLOBAL_dirs.base_dir)
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.images_dir, BUFSIZE, "%s%simages", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR);
|
||||||
|
else
|
||||||
|
#ifdef SWITCH_IMAGE_DIR
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.images_dir, BUFSIZE, "%s", SWITCH_IMAGE_DIR);
|
||||||
|
#else
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.images_dir, BUFSIZE, "%s%simages", base_dir, SWITCH_PATH_SEPARATOR);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SWITCH_GLOBAL_dirs.data_dir && (SWITCH_GLOBAL_dirs.data_dir = (char *) malloc(BUFSIZE))) {
|
||||||
|
if (SWITCH_GLOBAL_dirs.base_dir)
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.data_dir, BUFSIZE, "%s", SWITCH_GLOBAL_dirs.base_dir);
|
||||||
|
else
|
||||||
|
#ifdef SWITCH_DATA_DIR
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.data_dir, BUFSIZE, "%s", SWITCH_DATA_DIR);
|
||||||
|
#else
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.data_dir, BUFSIZE, "%s", base_dir);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SWITCH_GLOBAL_dirs.localstate_dir && (SWITCH_GLOBAL_dirs.localstate_dir = (char *) malloc(BUFSIZE))) {
|
||||||
|
if (SWITCH_GLOBAL_dirs.base_dir)
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.localstate_dir, BUFSIZE, "%s", SWITCH_GLOBAL_dirs.base_dir);
|
||||||
|
else
|
||||||
|
#ifdef SWITCH_LOCALSTATE_DIR
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.localstate_dir, BUFSIZE, "%s", SWITCH_LOCALSTATE_DIR);
|
||||||
|
#else
|
||||||
|
switch_snprintf(SWITCH_GLOBAL_dirs.localstate_dir, BUFSIZE, "%s", base_dir);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (!SWITCH_GLOBAL_dirs.certs_dir && (SWITCH_GLOBAL_dirs.certs_dir = (char *) malloc(BUFSIZE))) {
|
if (!SWITCH_GLOBAL_dirs.certs_dir && (SWITCH_GLOBAL_dirs.certs_dir = (char *) malloc(BUFSIZE))) {
|
||||||
if (SWITCH_GLOBAL_dirs.base_dir)
|
if (SWITCH_GLOBAL_dirs.base_dir)
|
||||||
switch_snprintf(SWITCH_GLOBAL_dirs.certs_dir, BUFSIZE, "%s%scert", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR);
|
switch_snprintf(SWITCH_GLOBAL_dirs.certs_dir, BUFSIZE, "%s%scert", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR);
|
||||||
|
@ -832,10 +876,14 @@ SWITCH_DECLARE(void) switch_core_set_globals(void)
|
||||||
switch_assert(SWITCH_GLOBAL_dirs.script_dir);
|
switch_assert(SWITCH_GLOBAL_dirs.script_dir);
|
||||||
switch_assert(SWITCH_GLOBAL_dirs.htdocs_dir);
|
switch_assert(SWITCH_GLOBAL_dirs.htdocs_dir);
|
||||||
switch_assert(SWITCH_GLOBAL_dirs.grammar_dir);
|
switch_assert(SWITCH_GLOBAL_dirs.grammar_dir);
|
||||||
|
switch_assert(SWITCH_GLOBAL_dirs.fonts_dir);
|
||||||
|
switch_assert(SWITCH_GLOBAL_dirs.images_dir);
|
||||||
switch_assert(SWITCH_GLOBAL_dirs.recordings_dir);
|
switch_assert(SWITCH_GLOBAL_dirs.recordings_dir);
|
||||||
switch_assert(SWITCH_GLOBAL_dirs.sounds_dir);
|
switch_assert(SWITCH_GLOBAL_dirs.sounds_dir);
|
||||||
switch_assert(SWITCH_GLOBAL_dirs.certs_dir);
|
switch_assert(SWITCH_GLOBAL_dirs.certs_dir);
|
||||||
switch_assert(SWITCH_GLOBAL_dirs.temp_dir);
|
switch_assert(SWITCH_GLOBAL_dirs.temp_dir);
|
||||||
|
switch_assert(SWITCH_GLOBAL_dirs.data_dir);
|
||||||
|
switch_assert(SWITCH_GLOBAL_dirs.localstate_dir);
|
||||||
|
|
||||||
switch_assert(SWITCH_GLOBAL_filenames.conf_name);
|
switch_assert(SWITCH_GLOBAL_filenames.conf_name);
|
||||||
}
|
}
|
||||||
|
@ -1714,6 +1762,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
|
||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.script_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.script_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.htdocs_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.htdocs_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.grammar_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.grammar_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.fonts_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.images_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.recordings_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.recordings_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.sounds_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.sounds_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.temp_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.temp_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
|
||||||
|
@ -1769,9 +1819,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
|
||||||
switch_core_set_variable("script_dir", SWITCH_GLOBAL_dirs.script_dir);
|
switch_core_set_variable("script_dir", SWITCH_GLOBAL_dirs.script_dir);
|
||||||
switch_core_set_variable("temp_dir", SWITCH_GLOBAL_dirs.temp_dir);
|
switch_core_set_variable("temp_dir", SWITCH_GLOBAL_dirs.temp_dir);
|
||||||
switch_core_set_variable("grammar_dir", SWITCH_GLOBAL_dirs.grammar_dir);
|
switch_core_set_variable("grammar_dir", SWITCH_GLOBAL_dirs.grammar_dir);
|
||||||
|
switch_core_set_variable("fonts_dir", SWITCH_GLOBAL_dirs.fonts_dir);
|
||||||
|
switch_core_set_variable("images_dir", SWITCH_GLOBAL_dirs.images_dir);
|
||||||
switch_core_set_variable("certs_dir", SWITCH_GLOBAL_dirs.certs_dir);
|
switch_core_set_variable("certs_dir", SWITCH_GLOBAL_dirs.certs_dir);
|
||||||
switch_core_set_variable("storage_dir", SWITCH_GLOBAL_dirs.storage_dir);
|
switch_core_set_variable("storage_dir", SWITCH_GLOBAL_dirs.storage_dir);
|
||||||
switch_core_set_variable("cache_dir", SWITCH_GLOBAL_dirs.cache_dir);
|
switch_core_set_variable("cache_dir", SWITCH_GLOBAL_dirs.cache_dir);
|
||||||
|
switch_core_set_variable("data_dir", SWITCH_GLOBAL_dirs.data_dir);
|
||||||
|
switch_core_set_variable("localstate_dir", SWITCH_GLOBAL_dirs.localstate_dir);
|
||||||
#ifdef ENABLE_ZRTP
|
#ifdef ENABLE_ZRTP
|
||||||
switch_core_set_serial();
|
switch_core_set_serial();
|
||||||
#endif
|
#endif
|
||||||
|
@ -2751,12 +2805,16 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(void)
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.script_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.script_dir);
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.htdocs_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.htdocs_dir);
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.grammar_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.grammar_dir);
|
||||||
|
switch_safe_free(SWITCH_GLOBAL_dirs.fonts_dir);
|
||||||
|
switch_safe_free(SWITCH_GLOBAL_dirs.images_dir);
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.storage_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.storage_dir);
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.cache_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.cache_dir);
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.recordings_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.recordings_dir);
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.sounds_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.sounds_dir);
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.run_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.run_dir);
|
||||||
switch_safe_free(SWITCH_GLOBAL_dirs.temp_dir);
|
switch_safe_free(SWITCH_GLOBAL_dirs.temp_dir);
|
||||||
|
switch_safe_free(SWITCH_GLOBAL_dirs.data_dir);
|
||||||
|
switch_safe_free(SWITCH_GLOBAL_dirs.localstate_dir);
|
||||||
|
|
||||||
switch_event_destroy(&runtime.global_vars);
|
switch_event_destroy(&runtime.global_vars);
|
||||||
switch_core_hash_destroy(&runtime.ptimes);
|
switch_core_hash_destroy(&runtime.ptimes);
|
||||||
|
|
Loading…
Reference in New Issue