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:
@@ -105,7 +105,15 @@ install_security-dashboard() {
|
||||
if [[ "$ASTERISK_EA_DIR" == *asterisk-digital-ocean ]]; then
|
||||
ASTERISK_EA_CONTAINER="easy-asterisk-do"
|
||||
elif [ -n "$ASTERISK_EA_DIR" ]; then
|
||||
ASTERISK_EA_CONTAINER="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.
|
||||
if [[ -f "$ASTERISK_EA_DIR/docker-compose.yml" ]]; then
|
||||
ASTERISK_EA_CONTAINER="$(grep -m1 '^[[:space:]]*container_name:' "$ASTERISK_EA_DIR/docker-compose.yml" | awk '{print $2}')"
|
||||
fi
|
||||
[[ -z "$ASTERISK_EA_CONTAINER" ]] && ASTERISK_EA_CONTAINER="asterisk"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user