#!/bin/bash fn="/etc/nginx/monitoring_allow.conf" ip=`dig +short monitoring.tmrng.com` echo "allow $ip;" > $fn systemctl reload nginx