Developing lightweight computation at the DSG edge

Commit 0cf87215 authored by Pau Escrich's avatar Pau Escrich
Browse files

Add a check of the sms file before checking the md5

parent 0216c2f8
......@@ -200,8 +200,9 @@ publish_my_domains() {
echo -e "$ext_domains" >> $HOSTF
sed '/./!d' -i $SMSTMP $HOSTF
[ $(md5sum $SMSTMP $SMSF | awk '{print $1}' | uniq | wc -l) -gt 1 ] && cp -f $SMSTMP $SMSF
[ -f $SMSF ] && \
[ $(md5sum $SMSTMP $SMSF | awk '{print $1}' | uniq | wc -l) -eq 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