mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-21 04:42:46 +00:00
add timeout
This commit is contained in:
parent
5ef9ecd6ec
commit
f7888e0239
@ -6,7 +6,7 @@ fi
|
||||
|
||||
function update_homebrew_git() {
|
||||
cd $TUNASYNC_WORKING_DIR
|
||||
git remote -v update
|
||||
/usr/bin/timeout -s INT 3600 git remote -v update
|
||||
}
|
||||
|
||||
update_homebrew_git
|
||||
|
@ -6,7 +6,7 @@ fi
|
||||
|
||||
function update_linux_git() {
|
||||
cd $TUNASYNC_WORKING_DIR
|
||||
git remote -v update
|
||||
/usr/bin/timeout -s INT 3600 git remote -v update
|
||||
}
|
||||
|
||||
update_linux_git
|
||||
|
@ -4,4 +4,4 @@ if [ ! -d "$TUNASYNC_WORKING_DIR" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/usr/bin/timeout -s INT 3600 /home/tuna/.virtualenvs/bandersnatch/bin/bandersnatch -c /etc/bandersnatch.conf mirror || exit 1
|
||||
/usr/bin/timeout -s INT 3600 /home/tuna/.virtualenvs/bandersnatch/bin/bandersnatch -c /etc/bandersnatch.conf mirror
|
||||
|
@ -6,9 +6,11 @@ function sync_repo_ck() {
|
||||
|
||||
[ ! -d "$repo_dir" ] && mkdir -p "$repo_dir"
|
||||
cd $repo_dir
|
||||
lftp "${repo_url}/" -e 'mirror -v -P 5 --delete --only-missing --only-newer --no-recursion; bye'
|
||||
lftp "${repo_url}/" -e 'mirror -v -P 5 --delete --only-missing --only-newer --no-recursion; bye' || return 1
|
||||
wget "${repo_url}/repo-ck.db" -O "repo-ck.db"
|
||||
}
|
||||
|
||||
sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/x86_64" "${TUNASYNC_WORKING_DIR}/x86_64"
|
||||
sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/i686" "${TUNASYNC_WORKING_DIR}/i686"
|
||||
stat=0
|
||||
sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/x86_64" "${TUNASYNC_WORKING_DIR}/x86_64" || stat=1
|
||||
sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/i686" "${TUNASYNC_WORKING_DIR}/i686" || stat=1
|
||||
exit $stat
|
||||
|
Loading…
x
Reference in New Issue
Block a user