From 48ea40f550d1517630d50e863ca06ff859eddfa4 Mon Sep 17 00:00:00 2001 From: yaprodunov Date: Fri, 17 Jul 2026 12:45:53 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D1=8B=D0=B9=20=D1=81=D0=BA?= =?UTF-8?q?=D1=80=D0=B8=D0=BF=D1=82=20-=20=D1=81=D0=B8=D0=BD=D1=85=D1=80?= =?UTF-8?q?=D0=BE=D0=BD=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8F=20=D1=80=D0=B5?= =?UTF-8?q?=D0=BF=D0=BE=D0=B7=D0=B8=D1=82=D0=BE=D1=80=D0=B8=D0=B5=D0=B2=20?= =?UTF-8?q?new=20file:=20=20=20repo=5Fsync.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo_sync.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 repo_sync.sh diff --git a/repo_sync.sh b/repo_sync.sh new file mode 100644 index 0000000..ad4d240 --- /dev/null +++ b/repo_sync.sh @@ -0,0 +1,17 @@ +#!/bin/bash +repo=repo-wh01.gk.rosatom.local +repo_path='/var/www/repo/' +sync_dirs=( 'astra/1.7.9/' 'astra/1.7/' 'SN/' 'avz/' 'astra/1.7.10/' 'astra/1.8.5/' ) + +for sync_dir in ${sync_dirs[@]}; do + [ ! -d ${repo_path}${sync_dir} ] && mkdir -p ${repo_path}${sync_dir} + rsync -avz --delete --bwlimit=1000 --info=progress2 "$repo::repo/${sync_dir}" "${repo_path}${sync_dir}" +done + +if [ $? -ne 0 ]; then + echo "Access denied, check $repo" + exit 1 +fi + +chown www-data:www-data -R /var/www/repo +chmod 755 -R /var/www/repo \ No newline at end of file