优化
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
case "${ROCKETMQ_BROKER_IP:-}" in
|
||||
""|localhost|127.0.0.1|__BROKER_IP__|*'${'*)
|
||||
echo "ROCKETMQ_BROKER_IP must be an explicit client-reachable address" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
sed "s/__BROKER_IP__/${ROCKETMQ_BROKER_IP}/g" /config/broker.conf.template > /tmp/broker.conf
|
||||
if grep -Eq '__BROKER_IP__|\$\{' /tmp/broker.conf; then
|
||||
echo "broker.conf still contains an unresolved placeholder" >&2
|
||||
grep -nE '__BROKER_IP__|\$\{' /tmp/broker.conf >&2
|
||||
exit 1
|
||||
fi
|
||||
exec sh mqbroker -n rocketmq-namesrv:9876 -c /tmp/broker.conf
|
||||
Reference in New Issue
Block a user