add new reset.pl to cease.sh for now, until further automation

This commit is contained in:
mischa 2023-05-08 20:10:35 +02:00
parent fb45e88acc
commit 3de2ea491c

View File

@ -38,7 +38,9 @@ if vmctl show ${1%.txt} >/dev/null 2>&1; then
if vmctl show ${1%.txt} | grep stopped >/dev/null 2>&1; then if vmctl show ${1%.txt} | grep stopped >/dev/null 2>&1; then
echo -n "Current rDNS: " echo -n "Current rDNS: "
dig +short -x $(grep -A2 ${1%.txt} /etc/dhcpd.conf | awk '/fixed/ {print $2}' | tr -d ';') dig +short -x $(grep -A2 ${1%.txt} /etc/dhcpd.conf | awk '/fixed/ {print $2}' | tr -d ';')
grep -A3 ${1%.txt} /etc/dhcpd.conf | awk '/fixed/ {print "ssh ns1.high5.nl doas ptrd/reset.pl " $2}' | tr -d ';' IPV4=$(grep -A2 ${1%.txt} /etc/dhcpd.conf | awk '/fixed/ {print $2}' | tr -d ';')
IPV6=$(grep -A3 ${1%.txt} /etc/dhcpd.conf | awk '/fixed-address-ipv6/ {print $2}' | tr -d ';')
echo "a reset ${IPV4} ${IPV6}"
remove.pl ${1} remove.pl ${1}
deploy.pl deploy.pl
rcctl restart dhcpd rcctl restart dhcpd