go-action/add-dns.sh

11 lines
218 B
Bash
Raw Normal View History

2024-06-30 20:12:39 +08:00
#!/bin/sh
# 要添加的IP地址
IP="8.137.84.255"
# 要解析的域名
DOMAIN="pms.docker"
# 检查是否已经存在该DNS记录
if ! grep -q "$IP\s*$DOMAIN" /etc/hosts; then
echo "$IP $DOMAIN" >> /etc/hosts
fi