epiccurious / bitcoin-core-node-builder

Spin up a secure Bitcoin Core node with ease.
Other
3 stars 0 forks source link

refactor: pass interactive mode as an environmental variable for dist-upgrade #184

Closed epiccurious closed 11 months ago

epiccurious commented 11 months ago

https://manpages.ubuntu.com/manpages/jammy/man1/needrestart.1.html

But the environment variable [NEEDRESTART_MODE](https://github.com/liske/needrestart/commit/6269672b99ea0f58453ae125dfe11e9e5e174156) allows to specify a mode. And by choosing "(a)utomatically", you can benefit from needrestart without being blocked by the prompt:

sudo NEEDRESTART_MODE=a apt-get dist-upgrade --yes

https://manpages.ubuntu.com/manpages/jammy/man1/needrestart.1.html

       The  following  environment  variables  can  be  used to override the config file options.
       Command line parameters do always supersede them.

       NEEDRESTART_MODE
              Change the configured restart mode  (see  also  the  -r  parameter):  (l)ist  only,
              (i)nteractive or (a)utomatically