Files
freeswitch-docker/entrypoint.sh
2025-03-18 10:59:32 -04:00

17 lines
489 B
Bash
Executable File

#!/bin/bash
set -e
CONF_DIR="/usr/local/freeswitch/conf"
DEFAULT_CONF_DIR="/usr/local/freeswitch/default-conf"
# Check if conf directory is empty or missing files
if [ -z "$(ls -A "$CONF_DIR" 2>/dev/null)" ]; then
echo "Configuration directory is empty. Copying default configuration..."
cp -r "$DEFAULT_CONF_DIR"/* "$CONF_DIR"/
else
echo "Configuration directory is already populated. Skipping copy."
fi
# Execute the main process
exec /usr/local/freeswitch/bin/freeswitch