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:
@@ -56,9 +56,13 @@ fi
|
||||
# ── Container + directory detection ─────────────────────────────────────────
|
||||
section "Detecting install"
|
||||
|
||||
CONTAINER="$(docker ps --format '{{.Names}}' 2>/dev/null | grep -m1 -E '^easy-asterisk(-do)?$' || true)"
|
||||
# "asterisk" is this repo's current container name; "easy-asterisk" is what
|
||||
# an install kept from before that rename (never silently renamed under a
|
||||
# running deployment); "easy-asterisk-do"/"asterisk-do" cover a DigitalOcean
|
||||
# droplet install, old or new naming. Whichever is actually running wins.
|
||||
CONTAINER="$(docker ps --format '{{.Names}}' 2>/dev/null | grep -m1 -E '^(easy-)?asterisk(-do)?$' || true)"
|
||||
if [ -z "$CONTAINER" ]; then
|
||||
fail "No running easy-asterisk / easy-asterisk-do container found — is asterisk installed and started?"
|
||||
fail "No running asterisk / easy-asterisk / *-do container found — is asterisk installed and started?"
|
||||
echo ""
|
||||
echo " $PASS passed, $WARN warnings, $FAIL failed. Stopping — nothing else can be checked without a running container."
|
||||
exit 1
|
||||
@@ -196,8 +200,7 @@ if [ -z "$TURN_SERVER" ]; then
|
||||
warn "Add it via: sudo ./setup.sh asterisk (update mode)"
|
||||
else
|
||||
if grep -q '^ coturn:' "$EA_DIR/docker-compose.yml" 2>/dev/null; then
|
||||
COTURN_CONTAINER="easy-asterisk-coturn"
|
||||
[[ "$CONTAINER" == *-do ]] && COTURN_CONTAINER="easy-asterisk-do-coturn"
|
||||
COTURN_CONTAINER="${CONTAINER}-coturn"
|
||||
ok "Using an embedded, per-Asterisk coturn ($COTURN_CONTAINER); tested separately below."
|
||||
else
|
||||
COTURN_CONTAINER="coturn"
|
||||
|
||||
Reference in New Issue
Block a user