Update rm and cp paths in global rsnapshot config when upgrading from older version

This commit is contained in:
Janek Bevendorff 2016-11-17 01:57:25 +01:00
parent 3fae0fa63a
commit 9c9eb7b98a
1 changed files with 4 additions and 0 deletions

View File

@ -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