Compare commits

..

No commits in common. "cfa1b2e04d9056fe96981677bd856f7111ad9495" and "00a8f07170baae216a04a2617d9411d0fc2fd1d0" have entirely different histories.

1 changed files with 0 additions and 3 deletions

View File

@ -128,9 +128,6 @@ function update_script() {
if ! command -v argon2 >/dev/null 2>&1; then apt-get install -y argon2 &>/dev/null; fi
TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e)
sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env
if [[ -f /opt/vaultwarden/data/config.json ]]; then
sed -i "s|\"admin_token\":.*|\"admin_token\": \"${TOKEN}\"|" /opt/vaultwarden/data/config.json
fi
systemctl restart vaultwarden
fi
exit