aboutsummaryrefslogtreecommitdiff
path: root/contrib/debian/bin/bitcoind
blob: a2f55a9138afc9feb7117ffb51cb9dfe0cd81acd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

set -e

umask 077

basedir=~/.bitcoin
cfgfile="$basedir/bitcoin.conf"

[ -e "$basedir" ] || mkdir "$basedir"

[ -e "$cfgfile" ] || perl -le 'print"rpcpassword=",map{(a..z,A..Z,0..9)[rand 62]}0..9' > "$cfgfile"

exec /usr/lib/bitcoin/bitcoind "$@"