go-action/run.sh

11 lines
218 B
Bash

#!/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