镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-08 15:36:47 +00:00
add timeout
这个提交包含在:
@@ -6,7 +6,7 @@ fi
|
|||||||
|
|
||||||
function update_homebrew_git() {
|
function update_homebrew_git() {
|
||||||
cd $TUNASYNC_WORKING_DIR
|
cd $TUNASYNC_WORKING_DIR
|
||||||
git remote -v update
|
/usr/bin/timeout -s INT 3600 git remote -v update
|
||||||
}
|
}
|
||||||
|
|
||||||
update_homebrew_git
|
update_homebrew_git
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ fi
|
|||||||
|
|
||||||
function update_linux_git() {
|
function update_linux_git() {
|
||||||
cd $TUNASYNC_WORKING_DIR
|
cd $TUNASYNC_WORKING_DIR
|
||||||
git remote -v update
|
/usr/bin/timeout -s INT 3600 git remote -v update
|
||||||
}
|
}
|
||||||
|
|
||||||
update_linux_git
|
update_linux_git
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ if [ ! -d "$TUNASYNC_WORKING_DIR" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
[ ! -d "$repo_dir" ] && mkdir -p "$repo_dir"
|
||||||
cd $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"
|
wget "${repo_url}/repo-ck.db" -O "repo-ck.db"
|
||||||
}
|
}
|
||||||
|
|
||||||
sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/x86_64" "${TUNASYNC_WORKING_DIR}/x86_64"
|
stat=0
|
||||||
sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/i686" "${TUNASYNC_WORKING_DIR}/i686"
|
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
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户