Do not overwrite any existing global rsnapshot config

This commit is contained in:
Janek Bevendorff 2014-10-05 18:51:48 +02:00
parent dc8a35e78d
commit 9705fa78dc
1 changed files with 7 additions and 4 deletions

View File

@ -139,10 +139,13 @@ if [[ $MODE == "install" ]]; then
$MKDIR "$BKP_DIR"/usr/share/perl5 $MKDIR "$BKP_DIR"/usr/share/perl5
fi fi
$CP ./server/bkp/etc/* "$BKP_DIR"/etc/ # Do not overwrite existing config
# Correct command paths in rsnapshot config for Synology DSM if [ ! -e "$BKP_DIR"/etc/rsnapshot.global.conf ]; then
if [[ "$DISTRIBUTION" == "Synology" ]]; then $CP ./server/bkp/etc/* "$BKP_DIR"/etc/
sed -i "s#/usr/bin/\(cp\|rm\|rsync\|logger\)\$#/opt/bin/\1#" "$BKP_DIR"/etc/rsnapshot.global.conf # Correct command paths in rsnapshot config for Synology DSM
if [[ "$DISTRIBUTION" == "Synology" ]]; then
sed -i "s#/usr/bin/\(cp\|rm\|rsync\|logger\)\$#/opt/bin/\1#" "$BKP_DIR"/etc/rsnapshot.global.conf
fi
fi fi
# Create symlink for chroot # Create symlink for chroot