]> git.pld-linux.org Git - projects/distfiles.git/blame - run-ff.sh
(Temporarily) support both scp and ftp
[projects/distfiles.git] / run-ff.sh
CommitLineData
a368e787 1#!/bin/sh
b396edfa 2# $Id$
a368e787
MM
3# script to be run from crontab
4
a39ae6c8
ER
5MAX_SESSIONS=4
6START_AT_ONCE=20
03e8c6c5 7WORK_DIR=~/distfiles
a368e787 8
03e8c6c5 9cd $WORK_DIR || exit 1
a368e787 10
8f99e561
MM
11for i in $(seq 1 $START_AT_ONCE) ; do
12 if [ $(ps -U $(id -u) | grep '[f]ile-fetcher.pl' | wc -l) -ge $MAX_SESSIONS ] ; then
13 exit 0
14 fi
48dcb309 15 nice -n 20 perl ./file-fetcher.pl
a39ae6c8 16 sleep 3
8f99e561 17done
319fb6c1
ER
18
19# vim: ts=2:sw=2:et
This page took 0.140424 seconds and 4 git commands to generate.