[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] moveftp.sh: adapt for security upload host



---
 scripts/debian/moveftp.sh | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/scripts/debian/moveftp.sh b/scripts/debian/moveftp.sh
index 926a261..f168bcd 100755
--- a/scripts/debian/moveftp.sh
+++ b/scripts/debian/moveftp.sh
@@ -6,6 +6,7 @@ set -u
 QUEUEHOSTS="queue-coccia"
 FTPDIR="/srv/upload.debian.org/ftp/pub/UploadQueue/"
 SSHDIR="/srv/upload.debian.org/UploadQueue/"
+PROCESSDELAYED=1
 HOST=$(hostname -s)
 
 # For usper, targetdir is the sshdir, everywhere else, its a seperate
@@ -13,6 +14,10 @@ HOST=$(hostname -s)
 if [[ ${HOST} == usper ]]; then
     TARGETDIR="${SSHDIR}"
     TOPROCESS="${FTPDIR}"
+elif [[ ${HOST} == suchon ]]; then
+    TARGETDIR=/srv/security.upload.debian.org/SecurityUploadQueue/
+    TOPROCESS=/srv/security.upload.debian.org/ftp/pub/SecurityUploadQueue/
+    PROCESSDELAYED=
 else
     TARGETDIR="/srv/upload.debian.org/mergedtree"
     TOPROCESS="${FTPDIR} ${SSHDIR}"
@@ -22,9 +27,11 @@ fi
 # the TARGETDIR)
 for sourcedir in ${TOPROCESS}; do
     find ${sourcedir} -maxdepth 1 -type f -mmin +5 -print0 -exec mv --no-clobber --target-directory=${TARGETDIR} -- "{}" +
-    for defdir in {0..15}; do
-        find ${sourcedir}/DELAYED/${defdir}-day -maxdepth 1 -type f -mmin +5 -print0 -exec mv --no-clobber --target-directory=${TARGETDIR}/DELAYED/${defdir}-day -- "{}" +
-    done
+    if [[ -n "${PROCESSDELAYED}" ]]; then
+        for defdir in {0..15}; do
+            find ${sourcedir}/DELAYED/${defdir}-day -maxdepth 1 -type f -mmin +5 -print0 -exec mv --no-clobber --target-directory=${TARGETDIR}/DELAYED/${defdir}-day -- "{}" +
+        done
+    fi
 done
 
 # If we are the master host, we have a little extra work to do, collect all
-- 
2.1.4



Reply to: