更新IP的获取方式

原命令也是基于 路径正确、操作系统输出格式正确,还不如 hostname -i 来得简单。  
hostname -i 在正确配置的操作系统下,都能正常获取IP地址。  
简单高效,简单就是好。
This commit is contained in:
higkoo 2020-03-23 19:52:19 +08:00 committed by GitHub
parent 408b6494d8
commit 060c00fa25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ redis:
identity: identity:
specify: "" specify: ""
shell: /usr/sbin/ifconfig `/usr/sbin/route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|head -n 1 shell: hostname -i
logger: logger:
dir: logs/judge dir: logs/judge