#!/bin/bash

set -e

if [ "$1" = "configure" ]
then
    if dpkg --compare-versions "$2" lt-nl 3.0.5; then
        find /etc/rrsync.d/ -mindepth 1 -maxdepth 1 -type f | while read file
        do
            echo "Moving old script to /etc/rrsync.d/pre: $file"
            mv "$file" "/etc/rrsync.d/pre/"
        done
    fi
fi

#DEBHELPER#

