summaryrefslogtreecommitdiff
path: root/cron-jobs/ftpdir-cleanup
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2009-09-13 18:19:59 -0500
committerDan McGee <dan@archlinux.org>2009-09-13 18:19:59 -0500
commit0897913c0adf10a0a9ff4d8790842715e0e3b1b4 (patch)
treeb93ec0754dbd687e60e3aa3cecec9cb1608b3996 /cron-jobs/ftpdir-cleanup
parent2afa1063284a25ae2691b2727c45238d15025a9a (diff)
Add new get_repos_for_host() function
And use it. This allows us to have server-specific behavior in our scripts without further patching, and it also allows us to simplify some of our scripts a fair amount. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'cron-jobs/ftpdir-cleanup')
-rwxr-xr-xcron-jobs/ftpdir-cleanup8
1 files changed, 4 insertions, 4 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index 04caf93..d66138c 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -1,6 +1,9 @@
#!/bin/bash
-repos="core extra testing"
+. "$(dirname $0)/../db-functions"
+. "$(dirname $0)/../config"
+
+repos="$(get_repos_for_host)"
LOCKFILE="/tmp/.ftpdircleanup.lock"
@@ -27,9 +30,6 @@ trap ctrl_c 2
#adjust the nice level to run at a lower priority
/usr/bin/renice +10 -p $$ > /dev/null
-#Get our destination dir
-. "$(dirname $0)/../db-functions"
-
for repo in $repos; do
$(dirname $0)/../misc-scripts/ftpdir-cleanup $repo $CLEANUP_DESTDIR
done