Since v1.28.0 vaultwarden added the option and recommendation to use argon2 as admin token instead of plaintext. For this they added both options as comments to their env template.
This sed currently appends the ADMIN_TOKEN_FILE option after each # ADMIN_TOKEN=.* pattern, which now exists twice.
Be my guest if someone has more knowledge in sed or awk as I'd like have a fairly safe and understandable replacement for it. It should append it only once after the whole comment block.
Since v1.28.0 vaultwarden added the option and recommendation to use argon2 as admin token instead of plaintext. For this they added both options as comments to their env template.
This sed currently appends the
ADMIN_TOKEN_FILE
option after each# ADMIN_TOKEN=.*
pattern, which now exists twice.Be my guest if someone has more knowledge in
sed
orawk
as I'd like have a fairly safe and understandable replacement for it. It should append it only once after the whole comment block.