alpha 0.1

This commit is contained in:
2026-01-17 13:12:11 +07:00
parent f41b83dff0
commit 97031d15f2
15 changed files with 296 additions and 642 deletions

21
lib/os-detect.sh Normal file
View File

@@ -0,0 +1,21 @@
detect_os() {
. /etc/os-release
OS_ID=$ID
OS_VERSION=$VERSION_ID
case $OS_ID in
ubuntu|debian)
PKG=apt
SSHD=sshd
;;
almalinux|rocky|centos|fedora)
PKG=dnf
SSHD=sshd
;;
*)
err "Неподдерживаемая ОС"
exit 1
esac
log "ОС: $OS_ID $OS_VERSION"
}