#!/usr/bin/env bash # Post-reboot validation fallout (2026-08-31). Run with sudo, once: # sudo ~/optimize/3-post-reboot-fixes.sh # 1. Installs ethtool + enables virtio multiqueue (host side now offers # 4 queues on ens18, 2 on ens19; the guest defaults to 1 until told). # 2. Installs the gateway ensure-up unit (prod boot race on the tailscale-IP # port bind + live-restore endpoint loss, both lanes; idempotent). set -euo pipefail [ "$(id -u)" = 0 ] || { echo "run with sudo"; exit 1; } cd "$(dirname "$0")" export DEBIAN_FRONTEND=noninteractive apt-get update -qq apt-get install -y -qq ethtool install -m 0755 staged/ukrrs-gateway-ensure.sh /usr/local/sbin/ install -m 0644 staged/systemd/ukrrs-gateway-ensure.service /etc/systemd/system/ install -m 0644 staged/systemd/ukrrs-net-multiqueue.service /etc/systemd/system/ systemctl daemon-reload systemctl enable --now ukrrs-net-multiqueue.service systemctl enable --now ukrrs-gateway-ensure.service echo; echo "== verify ==" ethtool -l ens18 ethtool -l ens19 timeout 5 bash -c '/dev/null && echo "gateway prod: serving on :4000"