config() {
  NEW="$1"
  OLD="$(dirname $NEW)/$(basename $NEW .new)"
  # If there's no config file in place, just install it:
  if [ ! -r $OLD ]; then
    mv $NEW $OLD
  elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
    # If it's identical, delete the .new:
    rm $NEW
  fi
}

config etc/amos/edge-relays.conf.new
config etc/amos/edge-ignore-deps.conf.new
config etc/amos/edge-keep.conf.new
config etc/haproxy/haproxy.cfg.new

chmod +x etc/rc.d/rc.edge-relays
chmod +x usr/sbin/edge-relays.sh
