From 1d1a09f89aa5bad8cfb92df57bf8b2cec722b9a2 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Mon, 6 Oct 2014 13:54:33 +0200 Subject: [PATCH] Use absolute paths to rsnapshot if possible --- server/usr/bin/rs-rotate | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/usr/bin/rs-rotate b/server/usr/bin/rs-rotate index ace867d..498ea31 100755 --- a/server/usr/bin/rs-rotate +++ b/server/usr/bin/rs-rotate @@ -37,5 +37,11 @@ if [ "$RSYNC_EXIT_STATUS" == "" ]; then fi if [ $RSYNC_EXIT_STATUS -eq 0 ] || [ $RSYNC_EXIT_STATUS -eq 24 ]; then - rsnapshot -c "$1" push + RSNAPSHOT="rsnapshot" + if [ -x /usr/bin/rsnapshot ]; then + RSNAPSHOT="/usr/bin/rsnapshot" + elif [ -x /opt/bin/rsnapshot ]; then + RSNAPSHOT="/opt/bin/rsnapshot" + fi + $RSNAPSHOT -c "$1" push fi