clan-cli: Add validity check for ssh

stash
This commit is contained in:
Qubasa
2024-06-21 16:37:52 +02:00
parent 37311f8145
commit 8038a9b488
3 changed files with 60 additions and 9 deletions

View File

@@ -38,9 +38,9 @@
];
generator.script = ''
if [[ -n $prompt_value ]]; then
echo $prompt_value > $secrets/user-password
echo $prompt_value | tr -d '\n' > $secrets/user-password
else
xkcdpass --numwords 3 --delimiter - --count 1 > $secrets/user-password
xkcdpass --numwords 3 --delimiter - --count 1 | tr -d '\n' > $secrets/user-password
fi
cat $secrets/user-password | mkpasswd -s -m sha-512 > $secrets/user-password-hash
'';