added a run to call the script as sudo if not already done so
moved flow logic into dns callback
moved string joined out of generic writeFile function for flexibility
simplified exec callback in run function
moved net_addr into global scope to mitigate having to pass it to
callbacks