Rename Asterisk container from easy-asterisk to asterisk
New installs now name the container "asterisk", matching every other service's container_name == service name convention, instead of reusing the vendored easy-asterisk CLI tool's own name (which stays /usr/local/bin/easy-asterisk inside the container, unrelated and unchanged). An existing "easy-asterisk" install is never silently renamed: every place that resolves the container name (_asterisk_resolve_layout in asterisk.sh, plus the duplicated copies in security-dashboard.sh, sms-inbound.sh, pstn-trunk.sh, and tools/pstn-test-check.sh's docker ps detection) now reads it from the box's own docker-compose.yml instead of assuming it, falling back to "asterisk" only when there's no existing install to read. Migrating a live box to the new name is a one-time manual action (edit docker-compose.yml's container_name for Asterisk and its coturn sidecar, docker compose down + up -d); every sibling service then picks it up automatically on its next run. The DigitalOcean-droplet layout (asterisk-digital-ocean directory, easy-asterisk-do container) is untouched by this - that naming stays exactly as documented for pre-merge droplet installs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SpKTLpwAgZNooTacWeQLuc
This commit is contained in:
@@ -53,7 +53,15 @@ _sms_detect_container_name() {
|
||||
if [[ "$_ea_dir" == *asterisk-digital-ocean ]]; then
|
||||
echo "easy-asterisk-do"
|
||||
else
|
||||
echo "easy-asterisk"
|
||||
# Read the box's own container_name instead of assuming — new
|
||||
# installs use plain "asterisk" now, but an existing "easy-asterisk"
|
||||
# install (this repo's container name before that rename) keeps
|
||||
# working unchanged until someone deliberately migrates it. See
|
||||
# services/asterisk.sh's _asterisk_resolve_layout for the reasoning.
|
||||
local _name=""
|
||||
[[ -f "$_ea_dir/docker-compose.yml" ]] && \
|
||||
_name="$(grep -m1 '^[[:space:]]*container_name:' "$_ea_dir/docker-compose.yml" | awk '{print $2}')"
|
||||
echo "${_name:-asterisk}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user