Загрузка данных


sudo bash <<'BASH'
set -Eeuo pipefail

echo "===== 1. HOSTNAME ====="
hostnamectl --static

test "$(hostname)" = "RUMOW11AI02V"

echo "===== 2. SSH CONFIGURATION ====="
/usr/sbin/sshd -t

echo "===== 3. SSH SERVICES ====="
systemctl is-active ssh.service || true
systemctl is-enabled ssh.service || true
systemctl is-active ssh.socket || true
systemctl is-enabled ssh.socket || true

if systemctl is-active --quiet ssh.socket &&
   systemctl is-enabled --quiet ssh.socket; then
    echo "SSH socket activation OK"
elif systemctl is-active --quiet ssh.service &&
     systemctl is-enabled --quiet ssh.service; then
    echo "SSH service OK"
else
    echo "ERROR: SSH startup after reboot not confirmed"
    echo "Reboot cancelled"
    exit 1
fi

echo "===== 4. PACKAGE STATUS ====="
dpkg --audit

echo "===== 5. REBOOT ====="
shutdown -r +1 "Ubuntu maintenance completed"

echo "Reboot scheduled in 1 minute"
BASH