Как установить и написать скрипт в микротик
Продолжение, то же самое для Linux Ubuntu одним скриптом:
💬 Наш канал: 👉 proit_world #!/bin/bash LOG_FILE="/var/log/install_all.log" # Redirect stdout/stderr to both terminal and log file exec > >(tee -a "$LOG_FILE") 2>&1 echo "===== Script started at $(date) =====" # === Detect active user and Desktop path === ACTIVE_USER=$(logname) # Gets the user who launched the script DESKTOP_PATH="/home/$ACTIVE_USER/Desktop" # Create Desktop path if not exists (just in case) mkdir -p "$DESKTOP_PATH" # Prepare system info file name DATE_NOW=$(date +%Y-%m-%d) SYSINFO_FILE="${DESKTOP_PATH}/${ACTIVE_USER}_$(hostname)_${DATE_NOW}.txt" # --- Robust, locale-independent...