Add rpc user and password as secrets

This commit is contained in:
Jonas Nick
2018-11-22 23:51:16 +00:00
parent 83eabcf952
commit 79aab1255a
7 changed files with 36 additions and 6 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
SECRETSFILE=secrets/secrets.nix
if [ -e "$SECRETSFILE" ]; then
echo $SECRETSFILE already exists
exit 1
fi
echo Installing apg through nix-env
nix-env -i apg
echo Creating bitcoin RPC password
echo \{ >> $SECRETSFILE
echo " bitcoinrpcpassword = \"$(apg -m 20 -x 20 -M Ncl -n 1)\";" >> $SECRETSFILE
echo \} >> $SECRETSFILE
echo Done