2014-09-12 23:18:40 +00:00
|
|
|
#!/bin/sh
|
2013-04-02 18:25:38 +00:00
|
|
|
|
|
|
|
if [ "$1" == "" ]; then
|
|
|
|
echo "Usage: $(basename $0) <rsnapshot config>"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$RSYNC_EXIT_STATUS" == "" ]; then
|
|
|
|
echo "This script is intended to be run as rsync post-xfer hook." 2>&1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2013-10-01 14:47:14 +00:00
|
|
|
if [ $RSYNC_EXIT_STATUS -eq 0 ] || [ $RSYNC_EXIT_STATUS -eq 24 ]; then
|
2013-04-02 18:25:38 +00:00
|
|
|
rsnapshot -c "$1" push
|
|
|
|
fi
|