added IP info to launch.sh, easier for PTR records

This commit is contained in:
mischa 2023-04-05 14:18:35 +02:00
parent d82c089e72
commit 755db95314
1 changed files with 5 additions and 0 deletions

View File

@ -53,6 +53,11 @@ rcctl restart dhcpd
vmctl reload
sleep 10
echo -n "Hostname: " ; grep -A7 ${1} /etc/dhcpd.conf | awk '/host-name/ {print $3}' | tr -d ';' | tr -d '"'
echo -n "IPv4: " ; grep -A7 ${1} /etc/dhcpd.conf | awk '/fixed-address / {print $2}' | tr -d ';'
echo -n "IPv6: " ; grep -A7 ${1} /etc/dhcpd.conf | awk '/fixed-address-ipv6/ {print $2}' | tr -d ';'
echo
mkfifo -m 600 /tmp/pipe_${1}
install -g mischa -m 600 -o mischa /dev/null ${LOGS}/${1}.log