From 8d7dd9bab3a1d2a2239c8df6c375a775c4277860 Mon Sep 17 00:00:00 2001 From: bigbong420 <207055395+bigbong420@users.noreply.github.com> Date: Mon, 30 Mar 2026 10:39:11 -0400 Subject: [PATCH] Prevent Ubuntu auto-reboot during apt upgrade --- install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/install.sh b/install.sh index 7d7e09a..65e26d2 100755 --- a/install.sh +++ b/install.sh @@ -259,8 +259,19 @@ if [ "$IS_UBUNTU" = false ]; then echo "deb https://packages.sury.org/nginx/ $CODENAME main" >> /etc/apt/sources.list fi +# Prevent Ubuntu from auto-rebooting during upgrade +if [ "$IS_UBUNTU" = true ]; then + systemctl mask needrestart.service 2>/dev/null || true + export NEEDRESTART_SUSPEND=1 + export NEEDRESTART_MODE=l +fi + apt update -qq DEBIAN_FRONTEND=noninteractive apt upgrade -y + +if [ "$IS_UBUNTU" = true ]; then + systemctl unmask needrestart.service 2>/dev/null || true +fi log_ok "Repositories configured" if [ "$SKIP_BINARIES" = true ]; then log_step "Step 3: Skipping binary compilation (--skip-binaries)"