chore: release 1.2.4-SAC — SAC ingest HTTP 201/409/202

Bump SSH_MONITOR_VERSION; sac-client release tag; updater logs sac-client ver.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-28 09:34:19 +10:00
parent 0e83d8825d
commit fe2a38857b
3 changed files with 19 additions and 4 deletions
+1
View File
@@ -1,4 +1,5 @@
# SAC client for ssh-monitor (source from ssh-monitor)
# SAC client release: 1.2.4-SAC — ingest HTTP 201/409/202
# shellcheck shell=bash
sac_normalize_mode() {
+1 -1
View File
@@ -7,7 +7,7 @@ IFS=$'\n\t'
# ============================================
CONFIG_FILE="/etc/ssh-monitor.conf"
SSH_MONITOR_VERSION="1.2.3-SAC"
SSH_MONITOR_VERSION="1.2.4-SAC"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ -f "$SCRIPT_DIR/sac-client.sh" ]; then
+17 -3
View File
@@ -242,6 +242,17 @@ read_ssh_monitor_version() {
printf '%s' "$line"
}
read_sac_client_version() {
local f="$1"
local line
[ -f "$f" ] || return 0
line=$(grep -E '^# SAC client release:' "$f" 2>/dev/null | head -1) || return 0
line=${line#*release: }
line=${line%% —*}
line=${line%% *}
printf '%s' "$line"
}
file_sha256() {
sha256sum "$1" 2>/dev/null | awk '{print $1}' || true
}
@@ -445,7 +456,10 @@ sync_sac_client() {
}
local_dst="${LOCAL_SCRIPT_PATH%/*}/sac-client.sh"
log_action "sac-client: remote=$remote local=$local_dst"
local remote_ver local_ver
remote_ver="$(read_sac_client_version "$remote")"
local_ver="$(read_sac_client_version "$local_dst")"
log_action "sac-client: remote=$remote ver=${remote_ver:-?} local=$local_dst ver=${local_ver:-?}"
remote_sum=$(file_sha256 "$remote")
if [ -z "$remote_sum" ]; then
SUMMARY_SAC_CLIENT="ошибка"
@@ -458,7 +472,7 @@ sync_sac_client() {
local_sum=$(file_sha256 "$local_dst")
if [ "$local_sum" = "$remote_sum" ]; then
SUMMARY_SAC_CLIENT="без изменений"
SUMMARY_SAC_REASON="sha256 совпадает (${local_sum:0:16}…)"
SUMMARY_SAC_REASON="sha256 совпадает; ver=${remote_ver:-?} (${local_sum:0:16}…)"
log_action "sac-client.sh: checksum совпадает, копирование не требуется"
debug_step "sac-client.sh без изменений"
return 0
@@ -479,7 +493,7 @@ sync_sac_client() {
chmod 644 "$local_dst"
SAC_CLIENT_CHANGED=1
SUMMARY_SAC_CLIENT="обновлён"
SUMMARY_SAC_REASON="sha256 ${remote_sum:0:16}"
SUMMARY_SAC_REASON="ver ${local_ver:-?}${remote_ver:-?}, sha256 ${remote_sum:0:16}"
log_action "sac-client.sh обновлён → $local_dst"
if [ "$DEPLOY_MODE" -eq 1 ]; then
say_ok "sac-client.sh → $local_dst"