PREIN
/bin/sh
/usr/sbin/groupadd -r -f _rsnapshot &>/dev/null ||:
POSTIN
/bin/sh
#
# upgrade rsnapshot config file
#
RSNAPSHOT_CONFIG_VERSION=`/usr/bin/rsnapshot check-config-version`
if test $? != 0; then
echo "Can't check config file (/etc/rsnapshot/rsnapshot.conf) version!"
else
if test "$RSNAPSHOT_CONFIG_VERSION" = "1.2"; then
# already latest version
exit 0
fi
if test "$RSNAPSHOT_CONFIG_VERSION" != "unknown"; then
/usr/bin/rsnapshot upgrade-config-file
if test $? != 0; then
echo "Error upgrading /etc/rsnapshot/rsnapshot.conf!"
echo "You need to uprade it manually!"
fi
else
echo "Error upgrading /etc/rsnapshot/rsnapshot.conf. Config format unknown!"
fi
fi
exit 0