Moved hash generation to the backend

Reviewed-on: ilchub/selfprivacy-nixos-infect#10
pull/16/head^2
ilchub 2021-04-21 13:37:05 +03:00
commit da35b57e39
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
set -e -o pipefail
makeConf() {
export HASHED_PASSWORD=$( mkpasswd -m sha-512 "$PASSWORD" )
# Skip everything if main config already present
[[ -e /etc/nixos/configuration.nix ]] && return 0
# NB <<"EOF" quotes / $ ` in heredocs, <<EOF does not
@ -1319,7 +1320,7 @@ infect() {
[ "$PROVIDER" = "digitalocean" ] && doNetConf=y # digitalocean requires detailed network config to be generated
apt update
apt install -y git
apt install -y git whois
prepareEnv
makeSwap # smallest (512MB) droplet needs extra memory!
checkEnv