0

我有大约 10 个运行 Unicorn 的节点。我想在每个节点上锁定 eth1 的监听地址。

我正在设置一个环境变量

export ETH1=`/sbin/ifconfig eth1 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`

然后尝试加载 config/unicorn.rb

ipaddress = ENV["ETH1"]
listen "#{ipaddress}:8080", :tcp_nopush => true

Unicorn 启动但仍在侦听所有接口。任何时候都可能有少于或多于 10 个节点,这就是我想要动态执行此操作的原因。

4

0 回答 0