From 9c9eb7b98a9281b2e781e3b793d4916c05d1ada7 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Thu, 17 Nov 2016 01:57:25 +0100 Subject: [PATCH] Update rm and cp paths in global rsnapshot config when upgrading from older version --- install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.sh b/install.sh index 8b1bac3..14df355 100755 --- a/install.sh +++ b/install.sh @@ -177,6 +177,10 @@ if [[ $MODE == "install" ]]; then if [[ "$DISTRIBUTION" == "Synology" ]]; then sed -i "s#/usr/bin/\(rsync\|logger\)\$#/opt/bin/\1#" "$BKP_DIR"/etc/rsnapshot.global.conf fi + else + # Update command paths if upgrading from earlier version + sed -i "#/opt/bin/cp\$#/usr/bin/cp#" "$BKP_DIR"/etc/rsnapshot.global.conf + sed -i "#/opt/bin/rm\$#/usr/bin/rs-rm#" "$BKP_DIR"/etc/rsnapshot.global.conf fi # Create symlink for chroot