freebsd-dev/etc/periodic/daily/210.backup-aliases
Paul Traina 12c88fdf8b Copy /etc/cron.d to /etc/periodic per-request of many.
This wasn't done with a repository copy because there was no
history of any consequence.  Flames to me.
1997-08-16 17:04:02 +00:00

23 lines
499 B
Bash
Executable File

#!/bin/sh
#
# $Id: 210.backup-aliases,v 1.1.1.1 1997/08/12 17:51:16 pst Exp $
#
bak=/var/backups
if [ -f /etc/aliases ] ; then
echo ""
echo "Backing up mail aliases:"
if [ ! -f $bak/aliases.bak ] ; then
echo "no $bak/aliases.bak"
cp -p /etc/aliases $bak/aliases.bak
fi
if cmp -s $bak/aliases.bak /etc/aliases; then :; else
echo "$host aliases diffs:"
diff $bak/aliases.bak /etc/aliases
mv $bak/aliases.bak $bak/aliases.bak2
cp -p /etc/aliases $bak/aliases.bak
fi
fi