Skip to content
Snippets Groups Projects
Commit e2a31da1 authored by MJB's avatar MJB
Browse files

#44 fixed by with conts-destroy.sh, now removes static ip from /etc/lxc/dnsmasq.conf

parent fc3c1f7b
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,6 @@ for service_name in $service_names; do
echo "Destroying container: ${service_name}"
lxc-destroy -n ${service_name}
ip=$(jq -r --arg NAME ${service_name} '.[] | select(.name==$NAME) | .ip_address' ${rspec_file})
#TODO: this line doesn't work for some reason and it's also dangerous because an IP could match more than 1 line in the file
#sed -i '/${ip}/d' /etc/lxc/dnsmasq.conf
sed -i "/dhcp-host=${service_name},/d" /etc/lxc/dnsmasq.conf
fi
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment