Prevent Ubuntu auto-reboot during apt upgrade
This commit is contained in:
1 parent
cd9f0721a8
commit
8d7dd9bab3
1 file changed
+11
+11
@@ -259,8 +259,19 @@ if [ "$IS_UBUNTU" = false ]; then
|
|||||||
echo "deb https://packages.sury.org/nginx/ $CODENAME main" >> /etc/apt/sources.list
|
echo "deb https://packages.sury.org/nginx/ $CODENAME main" >> /etc/apt/sources.list
|
||||||
fi
|
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
|
apt update -qq
|
||||||
DEBIAN_FRONTEND=noninteractive apt upgrade -y
|
DEBIAN_FRONTEND=noninteractive apt upgrade -y
|
||||||
|
|
||||||
|
if [ "$IS_UBUNTU" = true ]; then
|
||||||
|
systemctl unmask needrestart.service 2>/dev/null || true
|
||||||
|
fi
|
||||||
log_ok "Repositories configured"
|
log_ok "Repositories configured"
|
||||||
if [ "$SKIP_BINARIES" = true ]; then
|
if [ "$SKIP_BINARIES" = true ]; then
|
||||||
log_step "Step 3: Skipping binary compilation (--skip-binaries)"
|
log_step "Step 3: Skipping binary compilation (--skip-binaries)"
|
||||||
|
|||||||
Reference in new issue
Block a user