I am trying to write a script to provision a new server. It is important that all the commands in the script do not require user interaction. I want to run the command: apt-get upgrade -y
. I have noticed when I issue this command directly (ie. not in a script), a pop-up appears in my terminal:
Is there an option, or perhaps an alternative command that upgrades packages without needing this user interaction? I imagine if I put the command in a script the script would stop at this point and never resume.
I could also not see how to add an asterisk to a line which I presume indicates you want to restart that service. However, that is a different matter...