From 43d42398bcc186ec5f2fed6bc400b818607cdafa Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 27 Oct 2012 13:02:06 +0100 Subject: [PATCH] Keep track of the mirror target directory in an environment variable. Now we only need to configure it in one place. --- bin/run-mirrors | 1 + etc/ftpsync-common.conf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/run-mirrors b/bin/run-mirrors index ef7f92c..9c24c7d 100755 --- a/bin/run-mirrors +++ b/bin/run-mirrors @@ -10,6 +10,7 @@ esac ## Set up a plausible environment. HOME=/var/lib/mirror-admin; export HOME; cd +MIRRORS=/mnt/mirrors; export MIRRORS PATH=$HOME/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin export PATH umask 002 diff --git a/etc/ftpsync-common.conf b/etc/ftpsync-common.conf index 61712f4..5af48ee 100644 --- a/etc/ftpsync-common.conf +++ b/etc/ftpsync-common.conf @@ -15,7 +15,7 @@ ## CAREFUL, this directory will contain the mirror. Everything else that ## might have happened to be in there WILL BE GONE after the mirror sync! : ${LABEL="debian"} -: ${TO="/mnt/mirror/$LABEL/"} +: ${TO="$MIRRORS/$LABEL/"} ## The upstream name of the rsync share. : ${RSYNC_PATH="$LABEL"} -- 2.11.0