diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-03-04 18:07:40 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-03-04 18:07:40 -0300 |
commit | 41562238cd6a3ddab2b3073e3ffcbca254a95d91 (patch) | |
tree | 3f22473e83481489127335472fb61c724fbd9fc8 /social/bitcoin-daemon/bitcoin-daemon.install | |
parent | 11ea1816962daf30e568ce760a062c8290be7772 (diff) |
bitcoin-daemon-0.3.20.01-1
Diffstat (limited to 'social/bitcoin-daemon/bitcoin-daemon.install')
-rw-r--r-- | social/bitcoin-daemon/bitcoin-daemon.install | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/social/bitcoin-daemon/bitcoin-daemon.install b/social/bitcoin-daemon/bitcoin-daemon.install new file mode 100644 index 000000000..2eea98e2c --- /dev/null +++ b/social/bitcoin-daemon/bitcoin-daemon.install @@ -0,0 +1,18 @@ +post_install() { + echo "==> Creating the bitcoin user…" + groupadd -g 8333 bitcoin + useradd -d /var/lib/bitcoin-daemon -g 8333 -u 8333 -s /bin/false -N bitcoin + pw="$RANDOM$RANDOM$RANDOM" + echo "==> Setting the default RPC password to $pw" + echo "rpcpassword=$pw" >> /var/lib/bitcoin-daemon/bitcoin.conf + chown 8333:8333 /var/lib/bitcoin-daemon/bitcoin.conf + chmod 400 /var/lib/bitcoin-daemon/bitcoin.conf + echo "==> You can add bitcoind to your DAEMONS array in rc.conf." +} + +post_remove() { + echo "==> Deleting the bitcoin user…" + groupdel bitcoin + userdel bitcoin + echo "==> Your configuration file and wallet is still in /opt/bitcoin-daemon." +} |