summaryrefslogtreecommitdiffstats
path: root/network/ssmtp/doinst.sh
blob: ec579a954328fb11bff21744d8def6e6ea2c912d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
config() {
  NEW="$1"
  OLD="$(dirname $NEW)/$(basename $NEW .new)"
  if [ ! -r $OLD ]; then
    mv $NEW $OLD
  elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
    rm $NEW
  fi
}

config etc/ssmtp/revaliases.new
config etc/ssmtp/ssmtp.conf.new

# If there's no sendmail link, take over:
if [ ! -r usr/sbin/sendmail ]; then
  ( cd usr/sbin ; ln -sf ssmtp sendmail )
fi