Update vaultwarden-install.sh

This commit is contained in:
tschettervictor
2024-09-14 15:35:59 -06:00
committed by GitHub
parent 8be90bdb7d
commit 92bad1a965

View File

@@ -31,7 +31,7 @@ if [ "${REINSTALL}" == "true" ]; then
echo "Admin token will not be changed on a reinstall."
echo "Consult the docs to manually change it if needed."
else
ADMIN_HASH=$(echo -n ${ADMIN_TOKEN} | argon2 $(openssl rand -base64 32) -e -id -k 65540 -t 3 -p 4)
ADMIN_HASH=$(echo -n ${ADMIN_TOKEN} | argon2 "$(openssl rand -base64 32)" -e -id -k 65540 -t 3 -p 4 | sed 's#\$#\$\$#g')
sed -i '' "s|youradmintokenhere|${ADMIN_HASH}|" /usr/local/etc/rc.conf.d/vaultwarden
fi