Solved Updating FreeBSD via script

Hi,

I am trying to write a script to install Nextcloud on FreeBSD.
In normal operation I run
Code:
freebsd-update fetch
freebsd-update install

The problem that I have is that both command require a user intervention.
I tried to add -y at the end but that didn't work.

Could anyone please advise on how to run this 2 commands without the need for user interaction?

Thank you
 
But, why are you doing this for a package?
I am doing it so when I installed nextcloud via my script I make sure I got the latest FreeBSD version.
The script install nextcloud, mariadb, fail2ban, redis etc..
 
SirDice thank you for the URLs.
This just brought another question.. How do I install package without interaction?

Will this do the job?
Code:
export ASSUME_ALWAYS_YES=YES
pkg bootstrap
pkg update -f
pkg install firstboot-freebsd-update
 
SirDice thank you for the URLs.
This just brought another question.. How do I install package without interaction?

Will this do the job?
Code:
export ASSUME_ALWAYS_YES=YES
pkg bootstrap
pkg update -f
pkg install firstboot-freebsd-update
Thank you:)
 
Back
Top