From fed52473a9b8e9a75b786598618ffda011a6c801 Mon Sep 17 00:00:00 2001 From: adminer Date: Sun, 26 Apr 2026 09:14:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20uci=5Fbkp.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uci_bkp.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/uci_bkp.sh b/uci_bkp.sh index 3777333..62066f4 100644 --- a/uci_bkp.sh +++ b/uci_bkp.sh @@ -22,12 +22,16 @@ if ! command -v sshpass &> /dev/null; then sudo apt update && sudo apt install -y sshpass fi +if [ ! -d "bkps" ]; then + mkdir -p "./bkps" +fi + # Бэкап для каждого хоста for HOST in "${HOSTS[@]}"; do echo "Backing up $HOST..." #BACKUP_NAME="wrt-bkp-$HOST-$(date +%F).sh" -BACKUP_NAME="wrt-bkp-$HOST.sh" +BACKUP_NAME="./bkps/wrt-bkp-$HOST.sh" echo "# [*] Creating backup on router $HOST..."