diff options
author | EuAndreh <eu@euandre.org> | 2020-09-06 09:53:58 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-09-06 15:48:45 -0300 |
commit | 3f1d7201bfc46ff9edaa109bc41b59908f99c23b (patch) | |
tree | 30c89f1f19c156c044855839b62ea3eeca0a739a /gen-hash.sh | |
parent | nixos-switch.sh: Decouple the update of pires app from deploying the VPS (diff) | |
download | server-3f1d7201bfc46ff9edaa109bc41b59908f99c23b.tar.gz server-3f1d7201bfc46ff9edaa109bc41b59908f99c23b.tar.xz |
Refactor vps-configuration.nix: Split secrets from config and envsubst vars
Also rename thingTLD to thingDomain.
Diffstat (limited to 'gen-hash.sh')
-rwxr-xr-x | gen-hash.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gen-hash.sh b/gen-hash.sh new file mode 100755 index 0000000..774f9f9 --- /dev/null +++ b/gen-hash.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +set -Eeuo pipefail +cd "$(dirname "${BASH_SOURCE[0]}")" + +mkpasswd -m sha-512 \ + "$(cat ./secrets/user-password.txt)" \ + "$(cat ./secrets/user-salt.txt)" \ + | tr -d '\n' \ + > ./secrets/passwords/user-hash.txt |