]> git.pld-linux.org Git - projects/distfiles.git/blob - run-ff.sh
(Temporarily) support both scp and ftp
[projects/distfiles.git] / run-ff.sh
1 #!/bin/sh
2 # $Id$
3 # script to be run from crontab
4
5 MAX_SESSIONS=4
6 START_AT_ONCE=20
7 WORK_DIR=~/distfiles
8
9 cd $WORK_DIR || exit 1
10
11 for 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
15   nice -n 20 perl ./file-fetcher.pl
16   sleep 3
17 done
18
19 # vim: ts=2:sw=2:et
This page took 0.078534 seconds and 3 git commands to generate.