From 7544eb0a38c8284ff2d17529ff7108a6e169469a Mon Sep 17 00:00:00 2001 From: vados-dev Date: Sat, 4 Apr 2026 12:40:03 +0300 Subject: [PATCH] Autocommit in repo: , generated by owner: mikro_bak, in 12:40:02 04.04.2026. --- bin/ros-diff.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/ros-diff.sh b/bin/ros-diff.sh index 832c613..17a16fa 100755 --- a/bin/ros-diff.sh +++ b/bin/ros-diff.sh @@ -237,7 +237,7 @@ SSH_OPTS="${opts[*]}" ssh_str=("$CMD_SSH" "-2" "-4") scp_str=("${CMD_SCP}" "-2" "-4" "-B ${SSH_OPTS}") - + if [ -n "${SSHport}" ]; then ssh_str+=("-p ${SSHport}") scp_str+=("-P ${SSHport}") @@ -245,7 +245,7 @@ SSH_OPTS="${opts[*]}" ssh_str+=("-p ${DEFAULT_SSH_PORT}") scp_str+=("-P ${DEFAULT_SSH_PORT}") fi - + if [ -n "${SSHuser}" ]; then ssh_str+=("-l ${SSHuser}") scp_str+=("${SSHuser}@${host}") @@ -368,7 +368,7 @@ backup_binary() { crypt_str="dont-encrypt=yes" fi fi - + log_msg="Create ${bin_tmp} file on ${RouterName}..." log_info "${log_msg}" @@ -382,7 +382,7 @@ backup_binary() { log_msg="- Start download ${bin_tmp} file to ${BackupDir}..." log_info "${log_msg}" - + ${SCP_STR}:/${bin_tmp} ${bin_name} >/dev/null & pid=$! spinstr "$pid" wait "$pid" @@ -404,7 +404,7 @@ backup_binary() { fi log_msg="- Remove ${bin_tmp} file on ${RouterName}." log_info "${log_msg}" - + if ${SSH_STR} "/file remove [find name=${bin_tmp}]"; then log_msg="- Remove ${bin_tmp} file on ${RouterName} complete succesfully!" log_success "${log_msg}" @@ -462,7 +462,7 @@ log_info "${log_msg}" precedent_config=${BaseDir}"Precedent-Config.rsc" current_config=${TempDir}"Config.rsc" diff_config=${TempDir}"Diff-Config.rsc" -bin_tmp="Binary.backup" +bin_tmp=${TempDir}"Binary.backup" log_msg="Set variables for ${RouterName} success!" log_success "${log_msg}" @@ -496,15 +496,15 @@ if compare_config ${current_config} ${precedent_config} ${diff_config} ${RouterN log_success "${log_msg}" backup_binary ${bin_tmp} ${backup_pass} - + cd "${BaseDir}" - + CurrentHistoryDir=${HistoryDir}"${DStamp}/" ${CMD_MKD} -p ${CurrentHistoryDir} diff_config_history=${CurrentHistoryDir}"${DTStamp}-Diff-Config.rsc" log_msg="- Move ${diff_config} file to ${CurrentHistoryDir}." log_info "${log_msg}" - + if ${CMD_MV} -f ${diff_config} ${diff_config_history}; then log_msg="- Move ${diff_config} file to ${CurrentHistoryDir} complete succesfully!" log_success "${log_msg}" -- 2.52.0