chore(docs): sync repository URLs for kalinamall mirror

This commit is contained in:
PTah
2026-06-16 11:37:52 +10:00
parent 2956d14d94
commit 577db1da47
6 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
# ssh-monitor # ssh-monitor
Bash-скрипт мониторинга **SSH**, **SUDO** и событий **`systemd-logind`** (локальные/графические сессии и др.) с уведомлениями в **Telegram** и по **электронной почте (SMTP)**, опциональным резервным webhook, авто-блокировкой IP (**ipset** + **iptables** / **ip6tables**: наборы `hash:ip` с таймаутом, одно правило `-m set`; нюансы — **`IPSET-NOTES.txt`**) и ежедневным отчётом. Bash-скрипт мониторинга **SSH**, **SUDO** и событий **`systemd-logind`** (локальные/графические сессии и др.) с уведомлениями в **Telegram** и по **электронной почте (SMTP)**, опциональным резервным webhook, авто-блокировкой IP (**ipset** + **iptables** / **ip6tables**: наборы `hash:ip` с таймаутом, одно правило `-m set`; нюансы — **`IPSET-NOTES.txt`**) и ежедневным отчётом.
@@ -14,7 +14,7 @@ Bash-скрипт мониторинга **SSH**, **SUDO** и событий **`
## Конфигурация ## Конфигурация
> **Закрытый инстанс Gitea:** в доверенном закрытом репозитории допустимо хранить **`ssh-monitor.conf`** с боевыми токенами (файл не в `.gitignore`). В публичном [GitHub](https://github.com/PTah/ssh-monitor) такой файл игнорируется — используйте только `ssh-monitor.conf.example`. > **Закрытый инстанс Gitea:** в доверенном закрытом репозитории допустимо хранить **`ssh-monitor.conf`** с боевыми токенами (файл не в `.gitignore`). В публичном [GitHub](https://git.kalinamall.ru/PapaTramp/ssh-monitor) такой файл игнорируется — используйте только `ssh-monitor.conf.example`.
Скрипт читает параметры из `/etc/ssh-monitor.conf` в формате `KEY="value"`. Скрипт читает параметры из `/etc/ssh-monitor.conf` в формате `KEY="value"`.
@@ -163,7 +163,7 @@ bash -n ./ssh-monitor
make dist make dist
``` ```
Появится файл `ssh-monitor-<версия>.tar.gz` (через `git archive`). Готовые архивы для установки без клона репозитория прикладываются к [релизам на GitHub](https://github.com/PTah/ssh-monitor/releases). Появится файл `ssh-monitor-<версия>.tar.gz` (через `git archive`). Готовые архивы для установки без клона репозитория прикладываются к [релизам на GitHub](https://git.kalinamall.ru/PapaTramp/ssh-monitor/releases).
## Установка скрипта, конфигурации и systemd ## Установка скрипта, конфигурации и systemd
+2 -2
View File
@@ -41,7 +41,7 @@ flowchart LR
| Переменная | По умолчанию | Назначение | | Переменная | По умолчанию | Назначение |
|------------|--------------|------------| |------------|--------------|------------|
| `UPDATE_DIR` | `/opt/scripts/update` | Каталог для git-клона | | `UPDATE_DIR` | `/opt/scripts/update` | Каталог для git-клона |
| `REPO_URL` | `https://github.com/PTah/ssh-monitor.git` | URL репозитория (на закрытом зеркале — URL своего Gitea) | | `REPO_URL` | `https://git.kalinamall.ru/PapaTramp/ssh-monitor.git` | URL репозитория (на закрытом зеркале — URL своего Gitea) |
| `LOCAL_SCRIPT_PATH` | `/usr/local/bin/ssh-monitor` | Куда копировать бинарник | | `LOCAL_SCRIPT_PATH` | `/usr/local/bin/ssh-monitor` | Куда копировать бинарник |
| `LOG_FILE` | `/var/log/update_script.log` | Лог обновлений | | `LOG_FILE` | `/var/log/update_script.log` | Лог обновлений |
| `DEBUG` | `0` | `1` — подробный DEBUG в лог | | `DEBUG` | `0` | `1` — подробный DEBUG в лог |
@@ -169,4 +169,4 @@ sudo /opt/scripts/update_ssh_monitor.sh
- Обновляется **только** файл **`ssh-monitor`**, не конфиг и не watchdog. - Обновляется **только** файл **`ssh-monitor`**, не конфиг и не watchdog.
- При недоступном git **`git pull`** пишет предупреждение и продолжает с локальной копией. - При недоступном git **`git pull`** пишет предупреждение и продолжает с локальной копией.
- На **закрытом зеркале** в `update_ssh_monitor.sh` задайте **`REPO_URL`** своего Gitea; в публичном GitHub по умолчанию — `github.com/PTah/ssh-monitor`. - На **закрытом зеркале** в `update_ssh_monitor.sh` задайте **`REPO_URL`** своего Gitea; в публичном GitHub по умолчанию — `git.kalinamall.ru/PapaTramp/ssh-monitor`.
+2 -2
View File
@@ -1,4 +1,4 @@
# ssh-monitor # ssh-monitor
Bash script that monitors **SSH**, **SUDO**, and **`systemd-logind`** events (local/graphical sessions, etc.), sends alerts via **Telegram** and **SMTP email**, optional backup webhook, automatic IP blocking (**ipset** + **iptables** / **ip6tables**: `hash:ip` sets with timeout, single `-m set` rule; details in **`IPSET-NOTES.txt`**), and a daily report. Bash script that monitors **SSH**, **SUDO**, and **`systemd-logind`** events (local/graphical sessions, etc.), sends alerts via **Telegram** and **SMTP email**, optional backup webhook, automatic IP blocking (**ipset** + **iptables** / **ip6tables**: `hash:ip` sets with timeout, single `-m set` rule; details in **`IPSET-NOTES.txt`**), and a daily report.
@@ -160,7 +160,7 @@ Version is set as **`SSH_MONITOR_VERSION`** in **`ssh-monitor`** and **`version.
make dist make dist
``` ```
Produces `ssh-monitor-<version>.tar.gz` (via `git archive`). Prebuilt archives are attached to [GitHub releases](https://github.com/PTah/ssh-monitor/releases). Produces `ssh-monitor-<version>.tar.gz` (via `git archive`). Prebuilt archives are attached to [GitHub releases](https://git.kalinamall.ru/PapaTramp/ssh-monitor/releases).
## Installing the script, config, and systemd ## Installing the script, config, and systemd
+6 -6
View File
@@ -28,15 +28,15 @@ switch ($Target) {
$BaseHost = $Base -replace '^https://', '' $BaseHost = $Base -replace '^https://', ''
$patterns = @( $patterns = @(
@{ From = 'https://github.com/PTah/([^)/''"\s]+)/blob/main/'; To = "$Base/`$1$BlobSuffix/" } @{ From = 'https://git.kalinamall.ru/PapaTramp/([^)/''"\s]+)/blob/main/'; To = "$Base/`$1$BlobSuffix/" }
@{ From = 'https://git.kalinamall.ru/PapaTramp/([^)/''"\s]+)/src/branch/main/'; To = "$Base/`$1$BlobSuffix/" }
@{ From = 'https://git.kalinamall.ru/PapaTramp/([^)/''"\s]+)/src/branch/main/'; To = "$Base/`$1$BlobSuffix/" } @{ From = 'https://git.kalinamall.ru/PapaTramp/([^)/''"\s]+)/src/branch/main/'; To = "$Base/`$1$BlobSuffix/" }
@{ From = 'https://git.papatramp.ru/PTah/([^)/''"\s]+)/src/branch/main/'; To = "$Base/`$1$BlobSuffix/" }
@{ From = 'https://github.com/PTah/'; To = "$Base/" }
@{ From = 'https://git.kalinamall.ru/PapaTramp/'; To = "$Base/" } @{ From = 'https://git.kalinamall.ru/PapaTramp/'; To = "$Base/" }
@{ From = 'https://git.papatramp.ru/PTah/'; To = "$Base/" } @{ From = 'https://git.kalinamall.ru/PapaTramp/'; To = "$Base/" }
@{ From = 'github.com/PTah/'; To = "$BaseHost/" } @{ From = 'https://git.kalinamall.ru/PapaTramp/'; To = "$Base/" }
@{ From = 'git.kalinamall.ru/PapaTramp/'; To = "$BaseHost/" }
@{ From = 'git.kalinamall.ru/PapaTramp/'; To = "$BaseHost/" }
@{ From = 'git.kalinamall.ru/PapaTramp/'; To = "$BaseHost/" } @{ From = 'git.kalinamall.ru/PapaTramp/'; To = "$BaseHost/" }
@{ From = 'git.papatramp.ru/PTah/'; To = "$BaseHost/" }
) )
$extensions = @('*.md', '*.json', '*.service', '*.example', '*.sh', '*.ps1', '*.yml', '*.yaml') $extensions = @('*.md', '*.json', '*.service', '*.example', '*.sh', '*.ps1', '*.yml', '*.yaml')
+6 -6
View File
@@ -28,15 +28,15 @@ esac
# Order matters: longer patterns first. # Order matters: longer patterns first.
PATTERNS=( PATTERNS=(
's|https://github.com/PTah/\([^)/"'"'"' ]*\)/blob/main/|'"${BASE}"'/\1'"${BLOB_SUFFIX}"'/|g' 's|https://git.kalinamall.ru/PapaTramp/\([^)/"'"'"' ]*\)/blob/main/|'"${BASE}"'/\1'"${BLOB_SUFFIX}"'/|g'
's|https://git.kalinamall.ru/PapaTramp/\([^)/"'"'"' ]*\)/src/branch/main/|'"${BASE}"'/\1'"${BLOB_SUFFIX}"'/|g'
's|https://git.kalinamall.ru/PapaTramp/\([^)/"'"'"' ]*\)/src/branch/main/|'"${BASE}"'/\1'"${BLOB_SUFFIX}"'/|g' 's|https://git.kalinamall.ru/PapaTramp/\([^)/"'"'"' ]*\)/src/branch/main/|'"${BASE}"'/\1'"${BLOB_SUFFIX}"'/|g'
's|https://git.papatramp.ru/PTah/\([^)/"'"'"' ]*\)/src/branch/main/|'"${BASE}"'/\1'"${BLOB_SUFFIX}"'/|g'
's|https://github.com/PTah/|'"${BASE}"'/|g'
's|https://git.kalinamall.ru/PapaTramp/|'"${BASE}"'/|g' 's|https://git.kalinamall.ru/PapaTramp/|'"${BASE}"'/|g'
's|https://git.papatramp.ru/PTah/|'"${BASE}"'/|g' 's|https://git.kalinamall.ru/PapaTramp/|'"${BASE}"'/|g'
's|github.com/PTah/|'"${BASE#https://}"'/|g' 's|https://git.kalinamall.ru/PapaTramp/|'"${BASE}"'/|g'
's|git.kalinamall.ru/PapaTramp/|'"${BASE#https://}"'/|g'
's|git.kalinamall.ru/PapaTramp/|'"${BASE#https://}"'/|g'
's|git.kalinamall.ru/PapaTramp/|'"${BASE#https://}"'/|g' 's|git.kalinamall.ru/PapaTramp/|'"${BASE#https://}"'/|g'
's|git.papatramp.ru/PTah/|'"${BASE#https://}"'/|g'
) )
FILES=() FILES=()
+1 -1
View File
@@ -3,7 +3,7 @@
# === Конфигурация скрипта === # === Конфигурация скрипта ===
UPDATE_DIR="/opt/scripts/update" UPDATE_DIR="/opt/scripts/update"
SCRIPT_NAME="ssh-monitor" SCRIPT_NAME="ssh-monitor"
REPO_URL="https://github.com/PTah/ssh-monitor.git" REPO_URL="https://git.kalinamall.ru/PapaTramp/ssh-monitor.git"
LOCAL_SCRIPT_PATH="/usr/local/bin/ssh-monitor" LOCAL_SCRIPT_PATH="/usr/local/bin/ssh-monitor"
LOG_FILE="/var/log/update_script.log" LOG_FILE="/var/log/update_script.log"