From: Mark Wooding Date: Sat, 27 Oct 2012 12:02:06 +0000 (+0100) Subject: Keep track of the mirror target directory in an environment variable. X-Git-Url: https://git.distorted.org.uk/~mdw/mirror-admin/commitdiff_plain/43d42398bcc186ec5f2fed6bc400b818607cdafa Keep track of the mirror target directory in an environment variable. Now we only need to configure it in one place. --- 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"}