How to install programatically? - Password Hashing

Hey, I am about to write a bash script installing matomo.
I found a section about the database in the global config that I just have to copy and fill in I guess.

How do I correctly hash the password for a section that I didn’t find in there but here on the forum:

login = "loginname"
password = "pw"
email = "mail"
salt = “saltgoeshere”

I do this for tiny file manager which works for it:

hashed_pw=$(php -r "\$pw=password_hash(\"""$dbpassword""\", PASSWORD_DEFAULT); echo(\$pw);")

Also, besides the DB and the super user, what else do I need to do to have a ready to log in to matomo that I might have forgotten?

Thanks in advance!