diff --git a/etc/collector.yml b/etc/collector.yml index eb0e960b..8ba85351 100644 --- a/etc/collector.yml +++ b/etc/collector.yml @@ -4,7 +4,7 @@ logger: keepHours: 2 identity: specify: "" - shell: hostname -i + shell: ifconfig `route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|awk -F ':' '{print $NF}'|head -n 1 sys: # timeout in ms # interval in second diff --git a/etc/index.yml b/etc/index.yml index 2edebbdd..736a4e03 100644 --- a/etc/index.yml +++ b/etc/index.yml @@ -4,4 +4,4 @@ logger: keepHours: 2 identity: specify: "" - shell: hostname -i + shell: ifconfig `route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|awk -F ':' '{print $NF}'|head -n 1 diff --git a/etc/judge.yml b/etc/judge.yml index a2035f0d..e86f7d39 100644 --- a/etc/judge.yml +++ b/etc/judge.yml @@ -14,7 +14,7 @@ redis: identity: specify: "" - shell: hostname -i + shell: ifconfig `route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|awk -F ':' '{print $NF}'|head -n 1 logger: dir: logs/judge