userdata-refactor
inexcode 2022-07-14 20:48:26 +03:00
parent c155f32d5e
commit ac7b2ad12d
1 changed files with 3 additions and 3 deletions

View File

@ -10,14 +10,14 @@ makeConf() {
if [[ $PASSWORD == null ]]; then
export PASSWORD=$(printf $ENCODED_PASSWORD | base64 --decode)
fi
export ESCAPED_PASSWORD=$(printf $ENCODED_PASSWORD | base64 --decode | jq -Rs .)
export HASHED_PASSWORD=$( mkpasswd -m sha-512 "$PASSWORD" )
# NB <<"EOF" quotes / $ ` in heredocs, <<EOF does not
mkdir -p /etc/nixos
git clone https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git /etc/nixos
git clone -b its-wednesday-my-dudes https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git /etc/nixos
# Prevent grep for sending error code 1 (and halting execution) when no lines are selected : https://www.unix.com/man-page/posix/1P/grep
local IFS=$'\n'
@ -354,4 +354,4 @@ removeSwap
if [[ -z "$NO_REBOOT" ]]; then
reboot
fi
fi