diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-08-27 06:05:47 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-08-27 06:05:47 -0300 |
commit | d73f07b0acf8bae623e1e112a7cb3744a84a92ee (patch) | |
tree | 87a2b353ea5229bbe309ea9db9d43bf24e2a6fd8 /pcr/bitcoin-daemon/bitcoin-daemon.install | |
parent | c001329b017288676a28aa6078bf16ad42e318e9 (diff) | |
parent | 0ff008e3c9dcc5ef088f481dfff3dcd121575598 (diff) | |
download | abslibre-d73f07b0acf8bae623e1e112a7cb3744a84a92ee.tar.gz abslibre-d73f07b0acf8bae623e1e112a7cb3744a84a92ee.tar.bz2 abslibre-d73f07b0acf8bae623e1e112a7cb3744a84a92ee.zip |
Merge branch 'master' of ssh://lukeshu.com:1863/srv/git/mirror/parabola/abslibre
Diffstat (limited to 'pcr/bitcoin-daemon/bitcoin-daemon.install')
-rw-r--r-- | pcr/bitcoin-daemon/bitcoin-daemon.install | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pcr/bitcoin-daemon/bitcoin-daemon.install b/pcr/bitcoin-daemon/bitcoin-daemon.install new file mode 100644 index 000000000..5b2ffec92 --- /dev/null +++ b/pcr/bitcoin-daemon/bitcoin-daemon.install @@ -0,0 +1,20 @@ +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." +} |