mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-16 07:11:05 +01:00
23 lines
448 B
Bash
Executable File
23 lines
448 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
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 -u $bak/aliases.bak /etc/aliases
|
|
mv $bak/aliases.bak $bak/aliases.bak2
|
|
cp -p /etc/aliases $bak/aliases.bak
|
|
fi
|
|
fi
|