Run upgrade unattended?

When running an upgrade on an already configured box with the command

curl -s https://mailinabox.email/setup.sh | sudo bash

I get two interruptions:

  • OK button
  • Confirmation of box name

I would like to skip these two questions so that the upgrade can run unattended.

How do I achieve this goal?

This should do the trick…

export NONINTERACTIVE=1
export PRIMARY_HOSTNAME=box.yourdomain.tld
curl -s https://mailinabox.email/setup.sh | sudo -E bash
1 Like

If you want to make the environment variables persistent, you could create a new file,
e.g. miab-env.sh, in /etc/profile.d and add the following lines:

export NONINTERACTIVE=1
export PRIMARY_HOSTNAME=box.yourdomain.tld

…or you could add the following lines to /etc/environment:

NONINTERACTIVE="1"
PRIMARY_HOSTNAME="box.yourdomain.tld"
3 Likes

Thanks, I’m going for the /etc/profile.d approach.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.