refactor ip shell

This commit is contained in:
Ulric Qin 2020-12-29 12:00:17 +08:00
parent 9dbfef3df8
commit 4b22390faf
1 changed files with 2 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# 用来做心跳给服务端上报本机ip
ip:
specify: ""
shell: ifconfig `route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|head -n 1
shell: ifconfig `route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|head -n 1|awk -F':' '{print $NF}'
# MON、JOB的客户端拿来做本机标识
ident:
specify: ""
shell: ifconfig `route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|head -n 1
shell: ifconfig `route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|head -n 1|awk -F':' '{print $NF}'