summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/common19
1 files changed, 10 insertions, 9 deletions
diff --git a/etc/common b/etc/common
index 062afce..12d2f2b 100644
--- a/etc/common
+++ b/etc/common
@@ -53,20 +53,21 @@ signal () {
date -u >> "${LOGDIR}/${MIRROR}.log"
+ PUSHARGS=""
+ if [ -n "${PUSHARCHIVE}" ]; then
+ PUSHARGS="${PUSHARGS} sync:archive:${PUSHARCHIVE}"
+ fi
+ if [ -n "${PUSHCB}" ]; then
+ PUSHARGS="${PUSHARGS} sync:callback"
+ fi
+
if [ "xallx" = "x${PUSHTYPE}x" ]; then
# Default normal "fire and forget" push
- ssh $SSH_OPTIONS -i "${SSHKEY}" -o"user ${USERNAME}" -${SSHPROTO} "${HOSTNAME}" "sync:all" >>"${LOGDIR}/${MIRROR}.log" 2>&1 &
+ PUSHARGS1="sync:all"
+ ssh $SSH_OPTIONS -i "${SSHKEY}" -o"user ${USERNAME}" -${SSHPROTO} "${HOSTNAME}" "${PUSHARGS} ${PUSHARGS1}" >>"${LOGDIR}/${MIRROR}.log" 2>&1 &
elif [ "xstagedx" = "x${PUSHTYPE}x" ]; then
# Want a staged push. Fine, lets do that
- PUSHARGS=""
- if [ -n "${PUSHARCHIVE}" ]; then
- PUSHARGS="${PUSHARGS} sync:archive:${PUSHARCHIVE}"
- fi
- if [ -n "${PUSHCB}" ]; then
- PUSHARGS="${PUSHARGS} sync:callback"
- fi
-
# Step1: Do a push to only sync stage1, do not background
PUSHARGS1="sync:stage1"
ssh $SSH_OPTIONS -i "${SSHKEY}" -o"user ${USERNAME}" -${SSHPROTO} "${HOSTNAME}" "${PUSHARGS} ${PUSHARGS1}" >>"${LOGDIR}/${MIRROR}.log" 2>&1