Developing lightweight computation at the DSG edge

Commit 0216c2f8 authored by Pau Escrich's avatar Pau Escrich
Browse files

Fix mdns bug which increases the size of the sms send files

parent c38a288d
......@@ -176,6 +176,8 @@ publish_my_domains() {
local ip4="$(get_my_ip4)"
local ip6="$(get_my_ip6)"
[ -f "$SMSTMP" ] && rm -f $SMSTMP
[ -z "$ip4$ip6" ] && error "cannot get ip address"
[ -n "$ip4" ] && {
......@@ -196,8 +198,10 @@ publish_my_domains() {
log "publishing own external domains:\n$ext_domains"
echo -e "$ext_domains" >> $SMSTMP
echo -e "$ext_domains" >> $HOSTF
cp -f $SMSTMP $SMSF
sed '/./!d' -i $SMSTMP $HOSTF
[ $(md5sum $SMSTMP $SMSF | awk '{print $1}' | uniq | wc -l) -gt 1 ] && cp -f $SMSTMP $SMSF
}
get_domains() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment