2

When doing an apt update -y && apt upgrade -y for an automated script (that runs on startup in an interactive shell) I am prompted to restart certain services.

enter image description here

My script looks like

#!bin/bash

export DEBIAN_FRONTEND=noninteractive export NEEDRESTART_MODE=a

sudo apt-get -y update sudo apt-get -y upgrade sudo apt-get -y dist-upgrade sudo apt-get -y --fix-broken install

This is a "remote dev environment" based on Ubuntu that can only be accessed via ssh and is wiped when restarted - so I run these commands on initial ssh login (in an interactive shell).

David Alsh
  • 225
  • 2
  • 7

0 Answers0